I am using Windows 10 notification in my application. However, the code below (which works fine) seems to give a memo leak of 1 TNotification object and 2 lines, but I release the object at the end of the block:
aNotification := NotificationCenter.CreateNotification; //-- If not assigned then must be Win 8.1 or below if not assigned(aNotification) then exit; try aNotification.Title := AlignMixVersionName + ' License'; aNotification.AlertBody := aText; NotificationCenter.PresentNotification(aNotification); finally aNotification.Free; end;
Am I doing something stupid or is there a memory leak when implementing notifications?
windows-10 delphi notifications delphi-10-seattle
Steve maughan
source share