Well I''ve done some more testing and the leak seems to be in ImageMagick and unsurmountable.
 
I replicated my code by calling the COM object from Perl and got the same results from that interface.
I even tried using the specific PerlMagick interface and still saw a memory leak.
 
Unfortunately it looks like I'm stuck with launching a lot of  os.system() calls.  

 
On 2/21/06, Gordon Scott <gscott2112@gmail.com> wrote:
>What does pythoncom._GetInterfaceCount() return after this?  If not zero,
>then it may be possible there is another reference to the COM object you
>can't immediately see.  I can't think of a reason py2exe would behave any
>differently in this regard though.
 
Hrmmm..you're right, it does not look to be related to py2exe after all.  I added the call to _GetInterfaceCount() and re-ran the test in both python script form and in py2exe service-form.  Looks like I didn't pay close enough attention the first time  when running in script mode.  Memory gets released only once, subsequent attempts to free the COM object seem to have no effect and the memory continues to climb.
 
The return from pythoncom._GetInterfaceCount() are 0.

 
On 2/21/06, Mark Hammond <mhammond@skippinet.com.au > wrote:
> Is anyone out there familiar with using COM under py2exe?  I can't seem to
get
> my application to correctlly release a COM object when running under
py2exe
> (single executable).

I've never had such problems.

>   #none of this seems to release the COM object
>   #and associated memory when run under py2exe
>   del(self.magick)

What does pythoncom._GetInterfaceCount() return after this?  If not zero,
then it may be possible there is another reference to the COM object you
can't immediately see.  I can't think of a reason py2exe would behave any
differently in this regard though.

Mark