mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12: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
@ -110,7 +110,8 @@ begin
|
|||||||
// more detailed info
|
// more detailed info
|
||||||
writeln('EXCEPTION IN UPDATEFORM: We either hit Cancel, or something went wrong with files');
|
writeln('EXCEPTION IN UPDATEFORM: We either hit Cancel, or something went wrong with files');
|
||||||
end;
|
end;
|
||||||
Self.UpdateLog.Lines.Add('Done ...');
|
Self.UpdateLog.Lines.Add('Done ... ');
|
||||||
|
Self.UpdateLog.Lines.Add('Please restart all currently running Simba binaries.');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -186,6 +186,7 @@ begin
|
|||||||
{ Copy the client to ImageMain }
|
{ Copy the client to ImageMain }
|
||||||
bmp:=TMufasaBitmap.Create;
|
bmp:=TMufasaBitmap.Create;
|
||||||
bmp.CopyClientToBitmap(Window, true, 0, 0, w-1, h-1);
|
bmp.CopyClientToBitmap(Window, true, 0, 0, w-1, h-1);
|
||||||
|
ImageMain.Picture.Bitmap.Free;
|
||||||
ImageMain.Picture.Bitmap := bmp.ToTBitmap;
|
ImageMain.Picture.Bitmap := bmp.ToTBitmap;
|
||||||
bmp.Free;
|
bmp.Free;
|
||||||
|
|
||||||
|
@ -194,13 +194,13 @@ begin
|
|||||||
begin
|
begin
|
||||||
writeln('ReplacementFile not found');
|
writeln('ReplacementFile not found');
|
||||||
exit(False);
|
exit(False);
|
||||||
raise Exception.Create('ReplacementFile not found');
|
//raise Exception.Create('ReplacementFile not found');
|
||||||
end;
|
end;
|
||||||
if not FileExists(FReplacementFile+ '_') then
|
if not FileExists(FReplacementFile+ '_') then
|
||||||
begin
|
begin
|
||||||
writeln('ReplacementFile + _ not found');
|
writeln('ReplacementFile + _ not found');
|
||||||
exit(False);
|
exit(False);
|
||||||
raise Exception.Create('ReplacementFile + _ not found');
|
//raise Exception.Create('ReplacementFile + _ not found');
|
||||||
end;
|
end;
|
||||||
RenameFile(FReplacementFile, FReplacementFile+'_old_');
|
RenameFile(FReplacementFile, FReplacementFile+'_old_');
|
||||||
RenameFile(FReplacementFile+'_', FReplacementFile);
|
RenameFile(FReplacementFile+'_', FReplacementFile);
|
||||||
|
@ -395,7 +395,6 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
Result := TBitmap.Create;
|
Result := TBitmap.Create;
|
||||||
Result.SetSize(self.Width, self.Height);
|
|
||||||
ArrDataToRawImage(Self.Fdata, point(self.width,self.height), tr);
|
ArrDataToRawImage(Self.Fdata, point(self.width,self.height), tr);
|
||||||
Result.LoadFromRawImage(tr, false);
|
Result.LoadFromRawImage(tr, false);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user