interface "recursion" anxiety counting
i have little problem interfaces. here pseudo formula :
type
interface1 = interface
end;
interface2 = interface
end;
tparentclass = class(tinterfacedobject, interface1)
private
fchild : interface2;
public
way addchild(achild : interface2);
end;
tchildclass = class(tinterfacedobject, interface2)
private
fparent : interface2;
public
constructor create(aparent : interface1);
end;
can anyone flaw? i need child have anxiety it's parent, nonetheless anxiety counting doesn't work situation. i emanate parentclass instance, supplement child, following progenitor category never released. i why. i spin it?
Comments
Post a Comment