mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-25 02:32:19 -05:00
Memory leak fix in ToTBitmap. If you use .SetSize and then .LoadFromRawImage,
the previously allocated data is not freed. git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@359 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
f45746a754
commit
2dc2725364
File diff suppressed because it is too large
Load Diff
@ -111,6 +111,7 @@ begin
|
||||
writeln('EXCEPTION IN UPDATEFORM: We either hit Cancel, or something went wrong with files');
|
||||
end;
|
||||
Self.UpdateLog.Lines.Add('Done ... ');
|
||||
Self.UpdateLog.Lines.Add('Please restart all currently running Simba binaries.');
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
@ -186,6 +186,7 @@ begin
|
||||
{ Copy the client to ImageMain }
|
||||
bmp:=TMufasaBitmap.Create;
|
||||
bmp.CopyClientToBitmap(Window, true, 0, 0, w-1, h-1);
|
||||
ImageMain.Picture.Bitmap.Free;
|
||||
ImageMain.Picture.Bitmap := bmp.ToTBitmap;
|
||||
bmp.Free;
|
||||
|
||||
|
@ -194,13 +194,13 @@ begin
|
||||
begin
|
||||
writeln('ReplacementFile not found');
|
||||
exit(False);
|
||||
raise Exception.Create('ReplacementFile not found');
|
||||
//raise Exception.Create('ReplacementFile not found');
|
||||
end;
|
||||
if not FileExists(FReplacementFile+ '_') then
|
||||
begin
|
||||
writeln('ReplacementFile + _ not found');
|
||||
exit(False);
|
||||
raise Exception.Create('ReplacementFile + _ not found');
|
||||
//raise Exception.Create('ReplacementFile + _ not found');
|
||||
end;
|
||||
RenameFile(FReplacementFile, FReplacementFile+'_old_');
|
||||
RenameFile(FReplacementFile+'_', FReplacementFile);
|
||||
|
@ -395,7 +395,6 @@ var
|
||||
|
||||
begin
|
||||
Result := TBitmap.Create;
|
||||
Result.SetSize(self.Width, self.Height);
|
||||
ArrDataToRawImage(Self.Fdata, point(self.width,self.height), tr);
|
||||
Result.LoadFromRawImage(tr, false);
|
||||
end;
|
||||
|
Loading…
Reference in New Issue
Block a user