Einzelnen Beitrag anzeigen

Klaus01

Registriert seit: 30. Nov 2005
Ort: München
5.755 Beiträge
 
Delphi 10.4 Sydney
 
#3

Re: TBitmap als Rückgabewert - Speicherproblem

  Alt 21. Okt 2009, 15:17
kann man doch auch so machen, oder?

Delphi-Quellcode:
Function BitmapStuff:TBitmap;
begin
  result := TBitmap.create;
  //
  //Add stuff to that Tbitmap
  //
end;

..
myBitmap: TBitmap;

...
myBitmap:= BitmapStuff;
myBitmap.free;
Besser ist aber wer eine Instanz erstellt sollte sie auch wieder freigeben.
-> Procedure(bm:TBitmap);

Grüße
Klaus
Klaus
  Mit Zitat antworten Zitat