tqchen commented on a change in pull request #12047: [MXNET-779]Add DLPack
Transformation API
URL: https://github.com/apache/incubator-mxnet/pull/12047#discussion_r209298810
##########
File path: python/mxnet/_ctypes/ndarray.py
##########
@@ -31,21 +31,24 @@
class NDArrayBase(object):
"""Base data structure for ndarray"""
- __slots__ = ["handle", "writable"]
+ __slots__ = ["handle", "writable", "dlpack"]
# pylint: disable= no-member
- def __init__(self, handle, writable=True):
+ def __init__(self, handle, writable=True, dlpack=None):
Review comment:
In your case, when a get deleted, b still holds a NDArrayDLManager, which is
allocated by new, and that object still hold NDArray(which holds a shared_ptr),
so the original resource won't be released
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services