DEFINE CLASS dad as Custom son = null PROCEDURE init() this.son = CREATEOBJECT([son]) this.son.dad = this ENDPROC PROCEDURE destroy() MESSAGEBOX([Dad - Destroy]) ENDPROC ENDDEFINE ***--------------------------------*** DEFINE CLASS son as Custom dad = null PROCEDURE init() ENDPROC PROCEDURE destroy() MESSAGEBOX([Son - Destroy]) ENDPROC ENDDEFINETo do a test:
1: Create one PRG (MyPrg, for sample) 2: In Command Window do: - Set Procedure To MyPrg - X = CREATEOBJECT([Dad]) - Release X - In this moment don't appear any message, but if you to comment the line "this.filho.pai = this" the messages of the Destroy event appear.P.S.: I trying to use the Destroy, Unload, QueryUnload events, but didn´t work. I'm using VFP8 and W2K Professional. Sorry my bad English!