Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Proper Object Cleanup after Instantiation
Message
 
To
24/05/2002 09:54:22
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00660655
Message ID:
00661550
Views:
20
Gary,

>(1) I have a cbizobjModal Form set to private data session, that I've dropped several control classes I've created that have bizobjs on them to drive the controls. They were created on a form and then just the controls were "saved as class" to create them. When I run the form and close it multiple times, I have all the tables still open in datasessions called unknown(1), unknown(2) etc.

From what you've described, there's nothing special about this that should cause the "unknown" data sessions to occur. Do all of your CBizObjModal forms with private data sessions act the same way? Are you sure you're not overriding any form methods (i.e. Destroy, Cleanup) without issuing DODEFAULT()?

>(2) I have a cbizobform, set to private datasession, (List of Journals) that I added a clistobjedit class that I have calling a cbizobjMaintenace form set to default datasession (individual records making up journal). When I run the cbizobform and exit without calling the cbizobjMaintenace form everything cleans up. If do call the cbizobjMaintenace form, however many times, then I get the datasessions called unknown(1), unknown(2) etc. I thought the dataenvironment would close all open tables in a private data session when the dataenvironment was released.

>What causes unknown(1), unknown(2) etc.
>What can you suggest?

I've seen "unknown" data sessions occur from dangling object references. You may want to step through the Destroy() and Cleanup() methods of these forms to figure out what's going on.

Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Reply
Map
View

Click here to load this message in the networking platform