2009/7/7 Stéfan van der Walt <[email protected]>: > Hi Kenny > > 2009/7/7 Kenny Abernathy <[email protected]>: >> I can guarantee that all analysis will be finished before the Unit object is >> destroyed and delete[] is called, so I don't think that's a problem. > > There is a neat trick to make sure things don't get deallocated out of order: > > http://blog.enthought.com/?p=62 >
Moreover, if you use PyCObject_FromVoidPtr() http://docs.python.org/c-api/cobject.html, you can register a deallocation routine to be called at DECREF time, so no need at all of implementing your a brand new type. -- 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 _______________________________________________ Numpy-discussion mailing list [email protected] http://mail.scipy.org/mailman/listinfo/numpy-discussion
