Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object References
Message
From
16/10/1997 23:50:30
 
 
To
16/10/1997 12:13:21
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00054889
Message ID:
00055098
Views:
28
>I've been reading through all the threads I can find this morning about releasing object references, and still haven't found an answer to my problem. So, here goes... I have a toolbar with a container that has textboxes in it. The textboxes have properties that contain references to other objects in the container. The container has an array property that has pointers to all objects it contains. I cannot figure out how to get all the object references 'released'. I have tried putting code in the Destroy of the textboxes that sets their previously mentioned properties to .NULL. - I also have code in the Destroy of the container that sets its previously mentioned array property to .F.. In attempting to debug, it appears as though the Destroy event code never fires.
>I'm still getting GPF's - what else can I do?


Hmm, I'm not sure if I understand completely. Have you tried this already? Loop through your array and call the release method of the the object reference you have in the array. Then set the array value to .NULL. or .F.

I've had all kinds of problems and solutions dealing with object references as I use them throughout my code. Plus my framework is codebook so that alone brings alot of object reference uses into play. If you happen to have codebook you could take a look at their code for handling the release of toolbar objects. They seem to make it happen pretty elegantly because I've never had a problem with using controls in a toolbar and I'm just using their stock code with no modifications. In fact I have several toolbars that have textboxes in them for setting the systems process date and displaying the current user. But because the framework is handling all of the initialization and releases I can't really tell you how they do it. Probably the only part of the framework I haven't had to tinker with. :)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform