[Numpy-discussion] C-API: deallocating a partially filled object array
martin.wiechert at gmx.de
Fri Jan 26 14:47:37 CST 2007
On Friday 26 January 2007 21:45, Travis Oliphant wrote:
> Martin Wiechert wrote:
> >On Friday 26 January 2007 21:03, Robert Kern wrote:
> >>Martin Wiechert wrote:
> >>>Hi gurus,
> >>>is it (in C) safe to deallocate an array of type NPY_OBJECT, which
> >>>carries NULL pointers?
> >>Possibly, I'm not sure without doing some more code-diving. However, I
> >>strongly doubt that many other operations are safe. Depending on how you
> >>got such an array and how long it's expected to live, you might want to
> >> fix the NULL pointers.
> Object arrays with NULL pointers should be fine. Any DECREF (should be
> using) the XDECREF variant internally.
> So, yes, it should work fine.
> Numpy-discussion mailing list
> Numpy-discussion at scipy.org
More information about the Numpy-discussion