Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wishlist???
Message
 
À
06/09/1999 20:48:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Divers
Thread ID:
00260725
Message ID:
00261825
Vues:
54
Jim,

First I will jump back to the GetHook method of my application object. It creates objects and returns references to them. If a second routine calls for the same object the gethook simply returns a reference to the object that already exists.

So if programmer A writes a rotine that need MyWidget object adn calls gethook to get it the routine will have a reference stored somewhere, perhaps a variable. If Programmer B working on a different part of the system in another sate also use gethook to get Mywidget the gethook will return a refernce to it. Now if Programmer A, trying to be neat and clean up after himself release his memvar, that would blow away the object in the application's Hook collection adn in the routine that Programmer B wrote as well.

My position is that RELEASE MEMVAR should release a memory variable and nothing more. It should not have any effect on any other memvars anywhere regardless of what they are or what they point to. If one want to destroy an object completely then one should call a method in that object to destroy it. At least the object would have the ability ot know how many references there are and could systematically release each of them (of course the class architect would have to create the class that way).
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform