Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to clean up leftover Objects?
Message
From
25/03/2010 19:48:22
 
 
To
25/03/2010 17:07:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01457283
Message ID:
01457324
Views:
69
>I've written some code in a prg that creates an instance of a business object class, then runs some tests on the Obect.
>
>In the code I declare a public loBo variable to hold the object so I can make further use of it from the command window if I wanted to. After further testing, I RELEASE loBo, then I try to open the parent class of the class I tested so I can edit it, but it says: "Remove classes from memory?" and I click "Remove", then it says "Cannot modify a class that is in use".
>
>If I continue the process of trying to open it for about 3 or 4 times, it will finally open it up. So I know that when I click "Remove" that each time it is killing an object reference, and eventually, every thing get released and it will finally open it. I'm sure it a case of there still being object references hanging around in the class I created, and I will find and fix that issue...
>
>However, I wondering how I can determine, from the VFP IDE, what all variables or objects references are hanging around in the VFP environment. Surely there is a way to see what object references are alive in VFP at any given time. This would help me spot where the problem is, rather than me having to dig all around in my code trying to spot the problem.


To see what variables and objects are there open the LOCALS window - Tools|Locals

To remove the lot from memory from the IDE, use CLEAR ALL. I see this happening when I have the PEM editor project open to check/fix something and then want to recompile. Usually a clear all fixes this.

If you don't want something as drastic try SET CLASSLIB TO.
Previous
Reply
Map
View

Click here to load this message in the networking platform