Page 1 of 1

Releasing Image effects Template?

Posted: Tue Nov 10, 2009 3:01 pm
by prosigma
Hello!
Recently i discovered, that there EXISTS a method to release GdPictureImages. I thought it would do by itself, and now i've got to patch the whole project due to its caused garbage files. (Located in "Document and Settings\User\Local Settings\Temp")

But there occured one question:

Code: Select all

private bool loadTemplates(List<byte[]> blobs)
{
   try
   {
      foreach (byte[] blob in blobs)
      {
         byte[] b = blob;
         int img = this.m_image.CreateGdPictureImageFromByteArray(ref b);
         int templateHandle = this.m_image.ADRCreateTemplateFromGdPictureImage(img);

         this.m_image.ReleaseGdPictureImage(img);
      }
      return true;
   }
   catch
   {
      return false;
   }
}
Is the template still in the memory, when releasing its source image?
If it is: How can i remove the template from the memory?
If it isn't: How can this problem be solved, aside from remembering the imageID until the program exits and removing them at the end?

Thanks,
Thomas

Re: Releasing Image effects Template?

Posted: Tue Nov 10, 2009 3:16 pm
by Loïc
Hi Thomas,

Is the template still in the memory, when releasing its source image?
Yes.
If it is: How can i remove the template from the memory?
ADRDeleteTemplate()


Kind regards,

Loïc

Re: Releasing Image effects Template?

Posted: Tue Nov 10, 2009 3:29 pm
by prosigma
Thank you, Loïc!

Re: Releasing Image effects Template?

Posted: Tue Nov 10, 2009 3:30 pm
by Loïc
Here to serve !

You are welcome ;)