Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wishlist???
Message
From
06/09/1999 08:07:39
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00260725
Message ID:
00261724
Views:
49
Hi Jim,

First let me say that the details of how this should be done as relates to "dangling references" is something that should be decided by the VFP Team, in my opinion.

Now, on to your problem. . .

My view is that your programming should NOT be releaseing the utility object until you know full well that it is no longer needed by anything else. It would be my opinion that, if you have coded something in this way, you have been taking advantage of an "undocumented feature". More like exploiting a deficiency, really.

Also, let me take this opportunity to clarify another aspect that my arise, and that is the OS's maintenance of a 'use count' to know exactly when to actually release a COM object. In simplistic terms (because I do not know details but feel that I understand the concept) the OS already handles any object release 'command' by simply decrementing its 'use count', only actually releasing an object when its use count hits zero. This wished-for behaviour would have NO IMPACT on such OS proctises - it is limited specifically to the internals of VFP.

In the end there is a significant problem with RELEASE/Release() in VFP as currently handled. For the most part, people who are aware of this know what to code and where to prevent the problem. Those who do not, and I believe them to be in the vast majority (since well over 95% of VFP developers do not use facilities like UT, access the MS KB, etc) will forever be 'bitten' by this problem. That is untenable to me.

regards,

Jim N

>---Snip
>>>Let me clarify myself. Yes when a variable is relaesed it may release it's object also. But what about other refering variables (or even more complex: properties of other objects). IHMO they should be set to .NULL. rather then being released also.
>>>
>>
>>I see - my mistake. Fine with me.
>Jim and Walter,
>
>I see a major problem with this behavior for RELEASE. If I have a utility object that is instantiated by my application object and other objects call the application object for a reference, then releasing one reference would release the object and leave an unknown number of objects with no access to their utility object because the references were NULLed.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform