Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Release Issues - Getting Lots of Unknown Datasessions
Message
 
To
23/05/2002 09:39:01
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00660407
Message ID:
00660426
Views:
11
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform