Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Remove class from memory
Message
 
À
14/06/2002 20:10:50
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00668826
Message ID:
00668829
Vues:
18
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform