Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Memory Leak / Session Object
Message
 
 
To
07/11/2003 08:41:32
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00846763
Message ID:
00847697
Views:
27
Bob,

>If you to replace the scatter name with a scatter to:
>
>&&SCATTER NAME oRec
>SCATTER TO aRec
>&& Now when releasing oSession the datasession goes away.  Different behavior
>&& the Scatter Name commaand
>
>The datasession won't get held up like it would if you to do a scatter name.

Well, the big difference in the above code is aRec is not an object, it's an array. An array doesn't have the same mechanism of object references that the SCATTER NAME object uses.

>As far as scope goes, in my prior examples if the object that was created by Scatter name goes out of scope the datasesssion that was held up does go away.

Do you understand that the session must exist throughout the lifetime of the object created inside it? Because these objects can be more complex than your simple SCATTER NAME object. and they probably want to commit changes back to their datasource at some point.

Can I ask the bigger scope issue about why this is a problem for you? What are you trying to do?

> However in some of my testing when I create two session objects and do a scatter name to the same object reference in both datasession then release both session object one of the datasession will get held up and won't go away at all, even when explictly release the scatter reference. The problem here is I haven't been able to consistantly reproduce this behavior.

What is the use case for wanting the same object to contain data from different data sessions?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform