Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Automatic Destroy method
Message
From
10/08/2007 19:03:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01246863
Message ID:
01247560
Views:
32
>>As to this desirability, I am not quite sure. But do consider that anything you do at the root of the hierarchy of form classes, you will have to do only once. And, it might help you have less hard-to-find bugs, in this case, a form not releasing, 'cause you forgot to destroy some individual object.
>
>Thanks, Hilmar. It is not my application and I haven't checked every form if the references are currently cleared. If I'd found they are not, I'll made this method to be generic.

As Thomas said, you may go through amembers() and check everything (including each item in array properties) that's an object - and there check whether it has a parent (contained object) and whether that object is a default property (i.e. defined at parent class level, so can't be .removeObject()ed). If its .parent=null, it's a sure candidate to set equal to null.

However, maybe you worry for nothing. If it all releases fine and there are no visible references when you exit the code (look it up in the debugger, also check for any unexpected properties of _screen), then it works as advertised.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform