Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wishlist???
Message
From
06/09/1999 20:19:56
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00260725
Message ID:
00261820
Views:
54
I REALLY wnated to stay OUT of this piece, but that last sentence go to me...

Violation of encapsulation??? Well your method surely violates something even worse, or at the very least encapsulation! You have external coupling that is neither tight nor obvious, yet it is coupled nonetheless.
Really, I seriously do feel that you are relying on observed but undocumented behaviour - it *is* documented that a dangling reference must be released before an object can be released, but rather than taking this as warning to ensure that this is done you are using this 'fact' to extend the life of objects. I have eyeballed the VFP 6 docs and have not found this recommended/described anywhere.

We do agree to disagree and hopefully I can keep out of further where my nose doesn't belong/

Regards,

Jim N

>Snip ...
>>> ...IMHO we alway should use the release method to release an object.
>
>Walter,
>
>I agree with this point. I call it the Kavorkian pattern, never destroy an object, ask it to destroy itself.
>
>My point on the RELEASE command is simple, If I say RELEASE MyVar I expect MyVar to be released. I don't expect any other variable to be affected by the release command. Having the release of a memvar cause the release on an object when there are other vars referenceing that object just makes no sense to me. It strikes me as a major violation of encapsulation and an introduction of very tight external coupling.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform