Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SDT, SFReports, Kill Object and myprogram
Message
From
04/04/2000 13:50:57
 
 
To
04/04/2000 11:20:36
General information
Forum:
Visual FoxPro
Category:
Stonefield
Miscellaneous
Thread ID:
00354981
Message ID:
00355104
Views:
16
Hi John.

>the form will close normally right after I rebuild the DBC and I haven't exited the program.

What do you mean by "rebuild the DBC"?

>If I exit the program and restart - the form will no longer close.

So this means the form won't close if you simply run it and don't do anything?

The reason the form won't close is that something has a reference to it, so you have to track that down. For example, do you have an application object that has a reference to the form? If so, you'll need to nuke that reference before the form can close. Here's how I do it:

- The Release method of my base form class calls a custom method called Cleanup.

- Cleanup nulls references to any objects it has references to (so they can be released) and calls an abstract ReleaseMembers method.

- In a particular form, put code in ReleaseMembers to null any object references this form has *and* tell any object that has a reference to this form to release it.

Tracking down references like this can be an ugly chore. Good luck!

Doug
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform