From ff48af6db55fddd88685967a3b92d5c58ebe5ed5 Mon Sep 17 00:00:00 2001 From: BazzaCuda Date: Wed, 26 Apr 2023 15:59:30 +0100 Subject: [PATCH] fixed Alt-RightClick memory leak --- CustomMenu.dproj | 16 ++++++++-------- CustomMenu.res | Bin 129780 -> 129780 bytes FormCustomMenu.pas | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/CustomMenu.dproj b/CustomMenu.dproj index 6435cbd..48f9daf 100644 --- a/CustomMenu.dproj +++ b/CustomMenu.dproj @@ -140,11 +140,11 @@ UNICODE;$(DCC_Define) 0 9 - CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.3.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.3.0;Comments= + CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=0.9.4.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=0.9.4.0;Comments= - 3 + 4 @@ -207,6 +207,12 @@ $(PostBuildEvent)]]> true + + + CustomMenu.exe + true + + Assets\ @@ -214,12 +220,6 @@ $(PostBuildEvent)]]> true - - - CustomMenu.exe - true - - CustomMenu.exe diff --git a/CustomMenu.res b/CustomMenu.res index 8efb3cebfcf26de66656cc01f970291e840aef05..95742a79c54aeb89b36ce84d1cd65c370db024f1 100644 GIT binary patch delta 38 scmezJmHo?C_6cR2EDW3sAiy%Q{ve~tWJkvRj3&*DOxqcm7(f320QYYT`~Uy| delta 38 scmezJmHo?C_6cR2%nY0iAizAa{vf0AWJkvRjK; subMe end; begin - case GREFRESH of TRUE: iniFile := NIL; end; // user did Alt-RightClick on desktop to force reload of the ini file + case GREFRESH and (iniFile <> NIL) of TRUE: begin iniFile.free; iniFile := NIL; end;end; // user did Alt-RightClick on desktop to force reload of the ini file case (iniFile = NIL) and (not fileExists(iniFilePath)) of TRUE: begin result := FALSE; EXIT; end;end; case iniFile = NIL of TRUE: iniFile := TStringList.create; end; subMenuName := lowerCase(subMenuName); // so that subMenuName comparison isn't case sensitive