Yes in this case the function that calls CreateBitmap24 will take care
of freeing the Bitmap. But this does not fix my original problem to do
with the AV on line Result.LoadFromIntfImage( ScanLineImage );
Dominique.
wile64 wrote:
2007/11/25, Dominique Louis <[EMAIL PROTECTED]
<mailto:[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
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives