Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form won't release because of object reference?
Message
From
01/05/1997 14:05:40
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00030164
Message ID:
00030485
Views:
61
>I referenced objects by their name because I wanted to keep an array of objects and be able to sort them by their Top property (using asort)
>I was not aware that the bug that causes true references to fail had been fixed in 5.0a, but Michel said it had previously in this thread.

There's been some debate here whter it got "fixed". I haven't tried this particular trick myself.

If you're only using this array in one routine, use a LOCAL variable. It will destroy itself on exit from the method, which will take care of the problem.

If you want to maintain this array between methods, you could make the array a property of the form and put this in the QueryUnload() or Release() methods of the form:

Thisform.aObjectArray = .NULL.

which will destroy all those references before the "real" copies get destroyed, let alone the form itself.
David M. Stowell
Ravenslake Consulting
Chicago, Illinois

e-mail: davidstowell@ravenslakeconsulting.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform