2007/11/25, Dominique Louis <[EMAIL PROTECTED]>:
>
> Sorry I don't quite understand what you mean.
>
> Result is not freed in the function so the Bitmap should be fine.
>
> Please explain further.
>


We need to create a function that returns a bitmap created by this or that
it is necessary to create a procedure with a bitmap variable his modified by
procedure

Because I have a bad English I give an example ;)

example With function TInternalBitmap.CreateBitmap24 : TBitmap;

var MyBitmap: TBitmap;
begin
  MyBitmap:=CreateBitmap24;
  ...
  ...
  MyBitmap.Free;
end;
or
example with procedure TInternalBitmap.CreateBitmap24(ABitmap: TBitmap);

var MyBitmap: TBitmap;
begin
  MyBitmap:= TBitmap.Create;
  CreateBitmap24(MyBitmap);
  ...
  ...
  MyBitmap.Free;
end;

Bitmap is always free by calling...

Regards,

Laurent.

My Components: http://wiki.lazarus.freepascal.org/Wile64
French Forum : http://lazforum-fr.tuxfamily.org/index.php

Reply via email to