Hello,
In a set of inherited classes, the DESTRUCTOR procedure is called more than
one time if a parent class, has a DESTRUCTOR.
The below prg sample gives:
<output>
Destroying Dummy0 : DUMMY3
Destroying Dummy0 : DUMMY3
Destroying Dummy0 : DUMMY3
</output>
I think that this is incorrect behavior. Acceptable only when each parent
class has his own DESTRUCTOR.
best regards
Teo Fonrouge
<prg>
#include "hbclass.ch"
FUNCTION Main()
LOCAL o
o := Dummy3():New()
RETURN NIL
CLASS Dummy3 FROM Dummy2
ENDCLASS
CLASS Dummy2 FROM Dummy1
ENDCLASS
CLASS Dummy1 FROM Dummy0
ENDCLASS
CLASS Dummy0
DESTRUCTOR OnDestruct()
ENDCLASS
PROCEDURE OnDestruct CLASS Dummy0
? "Destroying Dummy0 : " + ::ClassName
RETURN
</prg>
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour