Loading...

GdPictureImaging.ClearGdPicture() corrupts other instances

Discussions about image processing in GdPicture.NET using GdPictureImaging.

GdPictureImaging.ClearGdPicture() corrupts other instances

Postby rbgolfin » Wed Jun 08, 2011 8:59 pm

I am running version 7.4.0.10. I have found that GdPictureImaging.ClearGdPicture() corrupts other instances of GdPictureImaging .

Here is my scenario:

- I open form 1 that creates an instance of GdPictureImaging and loads a tiff image.
- I open form 2 that creates another instance of GdPictureImaging and loads a different tiff image.
- On form 2 I do GdPictureImaging.ClearGdPicture() and close the form.
- I go back to form 1 and do int xx = moGdPictureImaging.TiffGetPageCount(mintImageSrcID);
- It throws an "Object Reference Not Set" exception.

If I just close form 2 and do not perform the ClearGdPicture() it works fine.
rbgolfin
 
Posts: 16
Joined: Wed Jun 03, 2009 3:10 pm

Re: GdPictureImaging.ClearGdPicture() corrupts other instanc

Postby Loïc » Thu Jun 09, 2011 11:14 am

Hi,

This is the normal behavior. ClearGdPicture() method simply purge all the cache, customer garbage collector, and opened images of the GdPicture engine.
So when you call this method, you have to understand that any GdPicture Image will remain open in any part of your application. This method should be considered as a public static method of the SDK.

Hope this helps !

Loïc
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France


Return to Image Processing

Who is online

Users browsing this forum: No registered users and 0 guests

cron