This is my problem - in short:
var c1:TClass1;
c2:TClass2;
begin
c1 := c1.Create;
c2 := c2.Create; //<<Exception;
end;
Both classes inherit TObject. If they are not inherited, I cannot use the debugger in the class, so I need to use TObject.
My real problem is that I have to instantiate a second class inside a function in an instance of the first class. I cannot find a way to free an instance of the first class while I'm inside it.
It seems I cannot have more than one class that inherits TObject, is there a problem?
How to fix my code, any suggestions?
Thanks in advance!
source
share