Update: Check accepted solution. Problem was irrelevant to class properties.
I have following problem in Matlab and cannot find anything on google or here. I have a handle class like this:
classdef myClass < handle
properties
hugeCellArray
otherVariables
end
...
end
I instanciate it as myObj = myClass(data);
Now if I try: clear myObj.hugeCellArray
it doesn't clear the property at all. If I try myObj.hugecellArray = [];
it does set the property as [] but the memory is still allocated!
So it seems like I cannot get rid of a huge variable in a class unless I clear the whole class?
Thanks in advance!
Edit: (Clarification) My problem is the memory. I don't want to actually delete the class property, I want to free its memory.