Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form contains common controls refuse to destroy
Message
 
 
To
13/07/1998 13:33:10
Juan Kh
Dataprop Technologies
Sungai Petani, Malaysia
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00116620
Message ID:
00116860
Views:
14
Juan,

I have to admit, I've never used the TreeView control in an app or even played with it for fun. So I'm not exactly sure where to tell you to look. In your form.Destroy() does it help to simply RemoveObject( "TheTreeView" )? Does the TreeView have a Release() method you can call. You are sure that you don't have a line like:

thisform.oTree = thisform.TheTreeView

This is the kind of thing that prevents an object from releasing.

CLEAR ALL is just kind of a way to get you past this problem, you can't put it in your app.

>CLEAR ALL works in the command window, it remove the form peacefully. But it does not work in destroy event of the form. The message given is "object still in use", something like that.
>
>I'd narrow down the search by adding a few lines of code in the destroy method of the form. These are the codes to remove all objects manually, using THISFORM.REMOVEOBJECT("myObject"), until the last object in the form. I notice the code failed when it tried to remove the TreeView object. I have no idea what holds up the object, preventing it from destroying. I check the code carefully and cannot find any pending reference to this object. Is there any other way to get rid of these "unknown" reference to objects???
df (was a 10 time MVP)

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

Click here to load this message in the networking platform