Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cycle Reference
Message
From
16/01/2004 10:00:43
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/01/2004 17:58:35
Erick Miranda
Formata Data Business - Grupo Linx
Contagem, Brazil
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Miscellaneous
Thread ID:
00866550
Message ID:
00867479
Views:
22
>Hi Cetin!
>
>>x = CREATEOBJECT('dad')
>>x.RELEASE
>>
>>DEFINE CLASS dad as Custom
>>	son = null
>>	PROCEDURE init
>>		this.son = CREATEOBJECT([son])
>>		this.son.dad = this
>>	ENDPROC
>>	PROCEDURE destroy
>>		MESSAGEBOX([Dad - Destroy])
>>	ENDPROC
>>	PROCEDURE release
>>		this.son = null
>>	endproc
>>ENDDEFINE
>>***--------------------------------***
>>DEFINE CLASS son as Custom
>>	dad = null
>>	PROCEDURE init
>>	ENDPROC
>>	PROCEDURE destroy
>>		MESSAGEBOX([Son - Destroy])
>>	ENDPROC
>>ENDDEFINE
>
>
>I can't intercept Release event.
>Thanks!
>P.S.: See Fabio Lunardon answer (thread #866550, message #866622). It's work very well.
>See you!

What do you mean. This works very well too. This works based on your sample and shows how you'd get rid of dangling reference. You didn't ask how to add objects to a custom class. You were asking about cycling references.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform