Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Remove class from memory
Message
 
To
14/06/2002 20:10:50
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00668826
Message ID:
00668829
Views:
19
>When an EXE calls another EXE such as Main.exe calling Sub.exe, I would like to know the proper way to cleaning a class from memory. In Sub.exe, I have a DEFINE CLASS... As soon as one CREATEOBJECT() is done on that class, the EXE remain locked in memory.
>
>My DEFINE CLASS is like this:
>
>
>DEFINE CLASS MyClass AS RELATION
>cProperty1=''
>cProperty2=''
>
>FUNCTION Method1
>ENDFUNC
>
>ENDDEFINE
>
>
>Then, when I call this class from Sub.exe, it goes like this:
>
>
>LOCAL loMyClass
>loMyClass=CREATEOBJECT('MyClass')
>loMyClass.Method1()
>
>
>So, the loMyClass is local. Basically, as soon as the process is over, loMyClass it out of memory. However, something gets stuck in it in regards to the class. What am I missing?


So after the loMyClass.Method1() call, that program ends? What you should do is after the method call, set loMyClass = .NULL. to clear it from memory.


Randy
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform