NDArrays are currently plain Objects. These need to be freed. This means a simple operation like an add over two newly allocated objects already leaks. Whoops!
The solution is RefCounted. It's a bit heavier than Object, but it's definitely needed because nobody can be asked to keep references to all their temporary tensors for a simple maths operation.
NDArrays are currently plain Objects. These need to be freed. This means a simple operation like an add over two newly allocated objects already leaks. Whoops!
The solution is RefCounted. It's a bit heavier than Object, but it's definitely needed because nobody can be asked to keep references to all their temporary tensors for a simple maths operation.
This is for both NDRange and NDArray.