infinitemedia$
infiniteme...

02/28/2007 :: 05:32

Anonyme

This creates a memory leak

oGdSquare.LoadFromPicture Picture.GetPicture
infinitemedia$
infiniteme...

02/28/2007 :: 05:33

Anonyme

Picture is an object that stores the main image and oGdSquare us created on in a loop and destructed at the end of the loop
Loïc$2006306
Loïc

02/28/2007 » 07:01

Registered

It is normal: You create a picture object with the GetPicture method and you never release it from the memory.

Use this code instead:

Dim oPicture as StdPicture
Dim nState as long

Set oPicture = Picture.GetPicture
nState = oGdSquare.LoadFromPicture(oPicture)
call oGdSquare.DeletePictureObject(oPicture)



There is no memory leak in GetPicture() or in LoadFromPicture() methods from the cGdPicture class.


Regards,

Loïc

Edited by @lcarrere  
back to forum