I noticed that there is always some unfreed memory block reported whenever I have TPythonDelphiVar in my apps. I HV added "finalize" to the destructor (see below) which seems to work. I am not sure whether this is the correct way. Please advise. TQ.
destructor TEngineClient.Destroy;
begin
Engine := nil; // This detaches the client from the
Engine.
if Assigned( FOnDestroy ) then
FOnDestroy( Self );
Self.finalize; //added by me
inherited;
end;
I noticed that there is always some unfreed memory block reported whenever I have TPythonDelphiVar in my apps. I HV added "finalize" to the destructor (see below) which seems to work. I am not sure whether this is the correct way. Please advise. TQ.
destructor TEngineClient.Destroy; begin Engine := nil; // This detaches the client from the Engine. if Assigned( FOnDestroy ) then FOnDestroy( Self ); Self.finalize; //added by me inherited; end;