I don't understand the implementation of libpointers in Matlab.
If I create a libpointer to a variable, it will copy the content (value) of the variable as well. I expected to retrieve only a pointer to the memory location and not a memcopy. To make it more clear: Img = ones(1000,100,100); % Increases memory usage with 78292 bytes ImgPtr = libpointer('doublePtr', Img); % Also increases memory usage with 78292 bytes
With this in mind, it doesn't matter if I make a copy of the data or use the pointer way. I'm trying to save memory usage but this doesn't work.
Is there a way to get only a pointer or is this not implemented?