Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Release Issues - Getting Lots of Unknown Datasessions
Message
 
À
23/05/2002 09:39:01
Information générale
Forum:
Visual FoxPro
Catégorie:
The Mere Mortals Framework
Divers
Thread ID:
00660407
Message ID:
00660426
Vues:
10
>I have noticed my application accumulates more and more unknown datasessions the longer the app is running. In several locations, I will create properties to hold the object references for bizobj classes I instantiate on my own. I was under the assumption that these classes would propertly die (close views and other cleanup) when the hosting method or class was released.
>

Are you explicitly releasing your object references in your code? If you're just using the bizobjs in a local variable, this isn't needed.

eg.
LOCAL loBizObj
loBizObj = CreateObject("MyBizObj")

* As soon as loBizObj goes out of scope, the object reference
* will be released. No special code should be necessary to
* clean things up.
However, if you're saving an object reference in a object property, you need to release the reference when this object is destroyed.
Init() method (or where it's created):

This.oBizObj = CreateObject("MyBizObj")

Destroy() method:

This.oBizObj = .NULL.
That should cause the bizobj Destroy() method to fire, which in turn will call it's Cleanup() method and release any used datasessions and/or child business objects.
-Paul

RCS Solutions, Inc.
Blog
Twitter
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform