[Numpy-discussion] NumPy re-factoring project
Sat Jun 12 12:00:30 CDT 2010
Den 12.06.2010 15:57, skrev David Cournapeau:
> Anything non trivial will require memory allocation and object
> ownership conventions. If the goal is interoperation with other
> languages and vm, you may want to use something else than plain
> malloc, to interact better with the allocation strategies of the host
> platform (reference counting, garbage collection).
We can allocate memory on the Python side e.g. using Python's bytearray,
ctypes array, or a Python string.
We don't need the convenstion of "ownership" if we use a Python object
to store the data buffer (e.g. bytearray). It owns itself, and commit
suicide when garbage collected.
More information about the NumPy-Discussion