Disclaimer: For PEP 3118, the differences in docs vs. implementation plus the differences in 2.6/2.7/3.x are a big mess. That being said, perhaps my following comments are wrong. Additionally, I guess Dag is the only one that can make some comment on this without wasting a lot of valuable time diving in CPython's source code.
After an enjoyable time debugging crashes and reference leaks, I think Cython should automatically set "view.obj = self" in __getbuffer__ special method. If this is not done, references can be easily leaked by creating a memoryview object (from Python land, our using PyMemoryView_FromObject), just look at Py2.7 Objects/memoryobject.c, function memory_dealloc, you will notice that iff view->obj==NULL, them self->base is never decrefed! Perhaps I'm missing something, but this really smells like a CPython bug. -- Lisandro Dalcin --------------- CIMEC (INTEC/CONICET-UNL) Predio CONICET-Santa Fe Colectora RN 168 Km 472, Paraje El Pozo Tel: +54-342-4511594 (ext 1011) Tel/Fax: +54-342-4511169 _______________________________________________ Cython-dev mailing list [email protected] http://codespeak.net/mailman/listinfo/cython-dev
