Information générale
Catégorie:
Programmation Orientée Object
Versions des environnements
>>Beware with this method since I doubt that the GC of VFP will clean up the class when it is released because of the circular reference. I've done a quick test and you can see that the memory is not released.
>
>I've tried to add
>
>this.self=null
>
>in the .destroy() of the class, but the consumption remains the same. Doing a Set Procedure, then later Release Procedure also did not help.
No, you need to put 'This.Self=null' in the Release(), and then you need to release the object - abc.Release() instead of (or after) abc = null. Of course this means you always need to release the object explicitly. Letting it go out of scope won't do the trick.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement