I wrote this code, but I am not sure if DWG file is freed. Each time i draw some file, memory consumtion increases and since this can happen 100 times it is necessary not to have leaks. Do you have some example of how to unload loaded file.
Code: Select all
If FileExists (FileName) Then Begin
FsgPaintBox.Picture.LoadFromFile(FileName);
Img := TsgDXFImage(FsgPaintBox.Picture.Graphic);
Img.BorderSize := 0;
...
End Else Begin
FsgPaintBox.Picture.Graphic := Nil;
Img := Nil;
End;
Regards Aleš