Hello,

 

I'm passing a numpy array into a C-extension. I would like my C-extension to
take ownership of the data and handle deallocating the memory when it is no
longer needed. (The data is large so I want to avoid  unnecessarily copying
the data).

 

So my question is what is the best way to ensure I'm using the correct
memory deallocator for the buffer? i.e the deallocator for what ever
allocator numpy used to allocate the array?

 

Thanks

Jeremy

 

Jeremy Lewi

Engineering Scientist

The Intellisis Corporation

jl...@intellisis.com

 

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to