Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Won't release the form
Message
From
10/09/2001 04:38:18
 
 
To
09/09/2001 13:46:42
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00542159
Message ID:
00554543
Views:
24
Nancy

Thanks for the info.

Even when I did sort out the releasing/destroying of the objects, I still had a problem.

It turns out I had a form's object in a property of the App object (dangling objects I think was the term I heard) so when I tried to releas the App, the last form opened, unloaded with some errors appearing.

However, it's fine now, and it's given me a better understanding of how objects are referenced etc.

Kev

>Kevin-
>
>>Is it visable to hold Form Objects in Properties, because I do it quite often, should I use variables instead?
>
>PMFJI (and a bit late, at that).
>
>There's no problem holding object references in properties. You just need to tidy up in the DESTROY, which I find to be very easy. My rule is this: if I design a class to have a property that will contain an object reference I first add the property, document it, then immediately add code to the class destroy that sets the property to .NULL. I never have any problems with forms releasing and I rarely have c0..5 errors.
>
>FWIW, if you have an array of object references, you need to cycle thru each element setting them to .NULL. before setting the arra property to .NULL. At least, that was what you had to do in 5.0.
Previous
Reply
Map
View

Click here to load this message in the networking platform