Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Relaseing Instantiated classes
Message
From
01/09/1998 22:56:22
 
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00131909
Message ID:
00132185
Views:
18
>If x is an external reference to an object adn you RELEASE THIS from within the object then the object will not release until you clear the external reference to it, therefore the need for x = .NULL.

I just assumed that x = Create("MyClass") means that x is a variable.

>As for RELEASE Object versus Object.Release() the former assume total control over the destruction of another object whose state may ro may not be know at the time. The latter, Object.Release(), requests that the object release itself (it knows its current state and can do whatever it needs to to clear that state and prepare for destruction). It is always a better design to allow an object to be responsible for its own destiny.

I agree. But I understood that the question is how to release an object assigned to variable when you don't know the name of that variable. Maybe I misunderstood it.

Vlad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform