Einzelnen Beitrag anzeigen

ZYLAGON

Registriert seit: 11. Nov 2015
49 Beiträge
 
Delphi 10.3 Rio
 
#11

AW: NotificationCenter und deren Funktion

  Alt 17. Mai 2017, 20:52
Zitat:
Delphi-Quellcode:
Delphi-Quellcode:
var
  MyNotification: TNotification;
begin
  MyNotification := NotificationCenter1.CreateNotification;
  try
    MyNotification.Name := 'Windows Notification';
    MyNotification.Title := 'My first Notification';
    MyNotification.AlertBody := 'Notification send by my application.';
    MyNotification.FireDate := Now()+EncodeTime(0,0,10,0);
    NotificationCenter1.PresentNotification(MyNotification);
  finally
    MyNotification.Free;
  end;
end;
Dieser Code erzeugt ein Speicherleck.
Weiß vielleicht jemand, wie das ohne Speicherleck geht?

ZYL
  Mit Zitat antworten Zitat