Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XML Class update
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00448121
Message ID:
00470018
Vues:
30
>Hi Erik,
>
>I was just starting to play with West Wind's version of this class and seem to be experiencing "dangling object" references after calling XMLToObject, etc. Have you had any trouble with object references (local and/or persisted) not being properly released using these methods? I took a quick look at the code and noticed several lo?? object references being returned back to the calling methods, so I don't really know an easy way to make sure these are getting released properly without doing some major surgery on the entire class structure. I didn't notice any manual garbage collection going on anywhere.
>

I haven't seen this. What symptoms are you experiencing? If you whittle down you code to a simple reproducible example that creates a dangling reference, you should report it to the messageboard at www.west-wind.com.

>Usually, if I need access to an object reference, rather than returning it back from a method I am calling, I persist it in the class (ie .o??) and make sure it is properly released in the destroy if it's VARTYPE = "O". Just wondering if you've addressed some of these issues in your modifications.

To be honest, this hasn't been an issue at all for me. If the method is an object factory, the most logical way to get the object back to the caller is to return it from method. In my experience there is no garbage collection needed when doing this- the reference simply goes out of scope when the factory method finishes. Returning object in this fashion requires much less 'garbage collection', because there are no properties to set to null when you are finished.
Erik Moore
Clientelligence
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform