Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object doesnt unload
Message
From
16/04/2003 12:09:08
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00778398
Message ID:
00778414
Views:
21
This message has been marked as the solution to the initial question of the thread.
Tom,

vfp caches the classes in memory. I believe a Clear Class Boo_A will help.
See help under Clear Commands

>To all,
>
>I've got a class that I can't get to unload.
>
>The class itself is not actually loaded. Instead, three subclasses of the class are instantiated with NEWOBJECT(). The subclass objects are properties of an umbrella class. At the end of the umbrella class that instantiates the subclasses, I dutifully NULL out the three instances of the subclasses.
>
>I can MODIFY each of the subclasses, but when I try to modify the parent class I get the "Remove classes from memory?" dialog box ([Remove] [Ignore]).
>If I [Ignore] I get the "Cannot modify a class that is in use" error message.
>
>

>loFoo = CREATEOBJECT("Shell")
>
>WITH loFoo
> .Prop1 = CREATEOBJECT("Boo1") *** subclass of Boo_A
> .Prop2 = CREATEOBJECT("Boo2") *** subclass of Boo_A
> .Prop3 = CREATEOBJECT("Boo3") *** subclass of Boo_A
>
> ... do stuff
>
> .Prop1 = .NULL.
> .Prop2 = .NULL.
> .Prop3 = .NULL.
>ENDWITH
>
>RELEASE loFoo
>
>MODI CLASS Shell *** no problem
>MODI CLASS Boo1 *** no problem
>MODI CLASS Boo2 *** no problem
>MODI CLASS Boo3 *** no problem
>
>MODI CLASS Boo_A *** "Remove Classes from memory?"
>
>
>Any ideas?
>
>Regards,
>Thom C.
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform