Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Possible WISH LIST item?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00149579
Message ID:
00150119
Vues:
35
HiI Rick,

>Didn't know that... Are you sure?

Yep, at least for VFP objects in a usual VFP environment. I haven't tried this neither with OLE server nor with ActiveX controls.

>Because code may run after you do RELEASE THIS. If you have subclassed
>the Destroy of the subclass may run in addition to yours. There may be
>code following the RELEASE THIS, which in reality shouldn't be accessible
>any longer, but in Fox it does. RELEASE doesn't fire any events explicitly
>except in a form - so you can't really capture that it's happening.

Well, RELEASE THIS is part of the Release() method, no Destroy. It will fire Destroy() just after finishing Release(). In the Destroy() event of containers I use RemoveObject() to release all contained object prior to finally destroying the object. At that point it's the only object and no other object is pointing to it.

>If you want a good idea try it in C++ by calling the destructor directly
>from within a class method <s>...

That's a different thing, don't you think?

Christof
--
Christof
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform