Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Release Property
Message
 
To
21/12/1999 11:18:44
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00306719
Message ID:
00306745
Views:
27
>Hi,
> I have a property of myclass that store the reference of an object. How to RELEASE the property? I try myclass.oObjRef = .NULL.
>does it RELEASE the object?
>
>Thank you

John,

Yes as long as there are no other references to that object anywhere else.
For example;
PUBLIC goObj
goObj = CreateObj("Whatever")
Thisform.oObj = goObj  && form property is now a reference to the object

Thisform.oObj = NULL  && form property is no longer a reference to the object
                      && but the object still exists because goObj hiolds a
                      && reference to it
RELEASE goObj && Now the object dies because there are no more references to it
If the form property was the only reference to the object then Thisform.Property = NULL would destroy the object.
Previous
Reply
Map
View

Click here to load this message in the networking platform