I guess what i'm asking, if I have a single python object reference the
IplImage* handle, and I delete the python object, the IplImage still exists,
so I would need to explicitly deallocate the image in the __dealloc__
special method, correct?


Thanks!

Chris

On Tue, May 19, 2009 at 12:12 PM, Lisandro Dalcin <dalc...@gmail.com> wrote:

> On Tue, May 19, 2009 at 12:54 PM, Chris Colbert <sccolb...@gmail.com>
> wrote:
> > Do I need to worry about python garbage collecting what I reference
> through
> > my IplImage*. i.e. when i create my images on the c-level, I alone am
> > responsible for freeing that space when no longer needed correct?
> >
>
> Well, it depens on what you want to achive... If different Python
> objects are going to proxy the same IplImage* handle, then you will
> have to manage memory yourself being carefull about making leaks or
> double deallocations. Or you could perhaps implement your own
> reference count scheme for the C data.
>
> >
> >
> > Chris
> >
> > _______________________________________________
> > Cython-dev mailing list
> > Cython-dev@codespeak.net
> > http://codespeak.net/mailman/listinfo/cython-dev
> >
> >
>
>
>
> --
> Lisandro Dalcín
> ---------------
> Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
> Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
> Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
> PTLC - Güemes 3450, (3000) Santa Fe, Argentina
> Tel/Fax: +54-(0)342-451.1594
> _______________________________________________
> Cython-dev mailing list
> Cython-dev@codespeak.net
> http://codespeak.net/mailman/listinfo/cython-dev
>
_______________________________________________
Cython-dev mailing list
Cython-dev@codespeak.net
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to