> -----Original Message-----
> From: Dan Sugalski [mailto:[EMAIL PROTECTED]]

> You need to get the refcounts correct for the elements of the 
> array. It 
> looks like the else section of the end if statement fetches 
> things out of 
> an array and sticks them in this one without incrementing 
> their refcounts. 
> That might be your problem.

Bingo.  If I mortalize, the problem is (almost entirely) resolved:

av_push(avMask, sv_2mortal(*av_fetch(avImage, i*3, 0)) );

I am still leaking a little bit from somewhere, but I'm sure I can figure it
out now that I better understand how the reference counts are working with
the use of av_fetch.

Thanks! 

Eric

Reply via email to