469,578 Members | 1,421 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,578 developers. It's quick & easy.

struggling with memory release using ctypes wrapper

I was wondering if a ctypes expert could point me in the right
direction.

I am using the wrapper for the "freeimage" library to create multipage
TIFF files from a group of png images. The images load and save fine,
the problem seems to be that the memory used during the bitmap creation
isn't being released properly until the python program ends and python
exits.

The multipage tiff's are created in a loop (ie, creating 3 tiffs from a
group of 14 png files). As the loop progresses, the files are built,
but the amount of memory that is used and reported by Windows XP
taskmanager is not released until python program exits at which time
the amount of memory reported is exactly the same as the start of the
processing.

I am using WinXP SP2, Python 2.4.4, ctypes 1.0.1 and the latest
freeimage libarary and wrapper.

My questions is this,
I have scoured the freeimage site and am confident that I am making the
correct calls to the library and in the correct sequence to release the
resources allocated by the freeimage dll. After each call to unload
the resources, I have checked the return values, and every thing
*seems* ok in this regard.

I have even used the gc module in DEBUG mode and nothing is reported as
uncollectible.

My questions:
Is there some other method to evaluate a running python program to see
what memory is consumed and objects which have this memory allocated??

Nov 8 '06 #1
1 1891
Oops, found the problem in my code.
Sorry for wasting peoples time if you're viewing.

Nov 8 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Srijit Kumar Bhadra | last post: by
reply views Thread by Srijit Kumar Bhadra | last post: by
1 post views Thread by skip | last post: by
reply views Thread by Terry Reedy | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.