Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Clearing an EXE
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00361624
Message ID:
00361652
Views:
19
>Is there anything I can do to ensure all objects are getting released? I have an exit button with the code "RELEASE THISFORM", then the UNLOAD event with "CLEAR EVENTS". Would a RELEASE ALL instead of a CLEAR ALL work (in the startup.prg)?

RELEASE only removes variables and arrays from the memory. I will release the objects assigned to variables, but will not affect the form which was created with DO FORM. The form or one of it's object properties may point to other objects. You should set such object properties to .NULL. before you try to release your form. What probably happens - because some objects were not released your form.unload() fails. It may not even get to your CLEAR ALL command. You may try to put WAIT WINDOWS in your programs/methods to check that. Also there is a utility OBJREF which can help you to find dangling references (runs in development environment) - file#94662 "ObjRef-finds dangling object references" in Files Section/VFP In General
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform