Alexander Koblov пре 4 година
родитељ
комит
a65e403268
2 измењених фајлова са 11 додато и 8 уклоњено
  1. 0 1
      src/platform/upixmapmanager.pas
  2. 11 7
      src/platform/uuniqueinstance.pas

+ 0 - 1
src/platform/upixmapmanager.pas

@@ -2177,7 +2177,6 @@ begin
       end;
 
       SFI.hIcon := 0;
-      Result := Graphics.TBitMap.Create;
       iIconLarge:= GetSystemMetrics(SM_CXICON);
       iIconSmall:= GetSystemMetrics(SM_CXSMICON);
 

+ 11 - 7
src/platform/uuniqueinstance.pas

@@ -297,13 +297,17 @@ begin
     FServerIPC.Active:=False;
     try
       LocalClientIPC:=TSimpleIPCClient.Create(nil);
-      IndexInstance:=1;
-      Result:=FALSE;
-      repeat
-        LocalClientIPC.ServerID:=GetServerIdNameToCheck;
-        Result:=LocalClientIPC.ServerRunning;
-        inc(IndexInstance);
-      until Result OR (IndexInstance>=10);
+      try
+        IndexInstance:=1;
+        Result:=FALSE;
+        repeat
+          LocalClientIPC.ServerID:=GetServerIdNameToCheck;
+          Result:=LocalClientIPC.ServerRunning;
+          inc(IndexInstance);
+        until Result OR (IndexInstance>=10);
+      finally
+        FreeAndNil(LocalClientIPC);
+      end;
     finally
       FServerIPC.Active:=True;
     end;