From: Andreas H. <ah...@us...> - 2005-11-27 11:17:13
|
Update of /cvsroot/jvcl/dev/JVCL3/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7351/run Modified Files: JvInterpreter_Graphics.pas Log Message: Work around for TBitmap.LoadFromResourceXxx functions GDI-Leak when application is minimized Index: JvInterpreter_Graphics.pas =================================================================== RCS file: /cvsroot/jvcl/dev/JVCL3/run/JvInterpreter_Graphics.pas,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** JvInterpreter_Graphics.pas 17 Feb 2005 10:20:39 -0000 1.13 --- JvInterpreter_Graphics.pas 27 Nov 2005 11:16:55 -0000 1.14 *************** *** 1218,1221 **** --- 1218,1222 ---- procedure TBitmap_LoadFromResourceName(var Value: Variant; Args: TJvInterpreterArgs); begin + TBitmap(Args.Obj).Assign(nil); // fixes GDI resource leak TBitmap(Args.Obj).LoadFromResourceName(Args.Values[0], Args.Values[1]); end; *************** *** 1225,1228 **** --- 1226,1230 ---- procedure TBitmap_LoadFromResourceID(var Value: Variant; Args: TJvInterpreterArgs); begin + TBitmap(Args.Obj).Assign(nil); // fixes GDI resource leak TBitmap(Args.Obj).LoadFromResourceID(Args.Values[0], Args.Values[1]); end; |