Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom Release method
Message
From
22/09/2005 13:13:20
 
 
To
22/09/2005 11:56:00
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01052014
Message ID:
01052064
Views:
8
>I have an object based on Custom class. I have added a .Release method, which contains Release This (after checking for dangling references and so on). So basically the method releases the object it belongs.
>
>As far as I can tell, it works good, but however, I'd rather ask: I am asking for trouble with this approach?
>
>Thank you.

VFP it annuls all the dangling reference for you:
dangling1=CREATEOBJECT("ciccia")
dangling2=dangling1

dangling2.Release
* NULL
? dangling1
? dangling2

DEFINE CLASS ciccia as custom

	PROCEDURE Release
		RELEASE this
		
	PROCEDURE destroy
		? "destroy"
ENDPROC
this is worth even if the object is a member of a form.
Previous
Reply
Map
View

Click here to load this message in the networking platform