Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Circular reference
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
00615370
Message ID:
00615400
Vues:
19
Rght. This is because you do not create additional reference to the object.

In VFP each object have internal property - Reference Count. As soon as you assign object to some variable or property, reference counter increased by 1. When variable released or property cleared, reference count is decreased by one. When reference count is zero, object is destroyed, so its Destroy method is called. When you release some object's variable (like in your sample with use of RELEASE command), object's reference count is descreased to 1, so it is not destroyed at all (its Destroy method is not called). When you remove the line "this.oBusiness=toBusiness", you do not create extra reference to the Business object, and as a result object is destroyed out from memory.

>Hi
>
>If you remove the line
>
> this.oBusiness=toBusiness
>
>from data.init, the destroy is trigger when release goBusiness, without a clear all
Vlad Grynchyshyn, Project Manager, MCP
vgryn@yahoo.com
ICQ #10709245
The professional level of programmer could be determined by level of stupidity of his/her bugs

It is not appropriate to say that question is "foolish". There could be only foolish answers. Everybody passed period of time when knows nothing about something.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform