Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Circular reference
Message
From
05/02/2002 08:05:13
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Title:
Circular reference
Miscellaneous
Thread ID:
00615370
Message ID:
00615370
Views:
63
Hi

I'm testing some classes defined in prg, I have problems with a circular reference. Why isn't trigger the destroy event?

Here is the code, copy in a prg and run!!!

*------------------------------------------------------------------
acti screen
clear

public goBusiness
goBusiness=createobject('Business')
release goBusiness

*-- USO DE LA CLASE SESSION
define class Business as Custom

protected oData

procedure init

? 'Business.init'
this.oData=createobject('Data',this)

endproc

procedure destroy

? 'Business.destroy'
this.oData=.null.

endproc

enddefine


define class Data as Session

protected oBusiness

procedure Init

lParameters toBusiness

? 'Data.init'
this.oBusiness=toBusiness

endproc

procedure destroy

? 'Data.destroy'
this.oBusiness=.null.

endproc

enddefine
*-----------------------------------------------------------
Rodrigo Juarez
rodrigoj@azinformatica.com.ar

Para entender la recursividad, primero, hay que entender la recursividad.
Next
Reply
Map
View

Click here to load this message in the networking platform