Ich habe es jetzt so angepasst und es gibt zumindest keinen Crash mehr...
Delphi-Quellcode:
destructor Destroy; override;
...
destructor TMxSQL.Destroy ;
begin
FreeAndNil(fStreamSetMain);
FreeAndNil(fStreamSetBSC);
SetLength(fColsSetMain, 0);
SetLength(fRowsSetMain, 0, 0);
SetLength(fColsSetBSC, 0);
SetLength(fRowsSetBSC, 0, 0);
Inherited;
end;
Aufruf:
MxSQL.Free;
Aber das Speicherleak ist immernoch katastrophal...
Zitat:
This application has leaked memory. The small block leaks are (excluding expected leaks registered by pointer):
21 - 36 bytes: System.Classes.TBytesStream x 3, System.Classes.TMemoryStream x 19
37 - 52 bytes: System.Classes.TMemoryStream x 1
1509 - 1668 bytes: Unknown x 1
The sizes of leaked medium and large blocks are (excluding expected leaks registered by pointer): 41124, 7332
Note: Memory leak detail is logged to a text file in the same folder as this application. To disable this memory leak check, undefine "EnableMemoryLeakReporting".