Ok, I have a question mark existing in my brain so long.
''Do we need to use 'delete' command to delete something if we create something before like new XXX ?''
?in this case, I have a function that will be called several times
?in the function, i need to empty all element of three array. So
?I think the easy way is just to?create new one. The thing is
?'should I delete the previous array memory?'' or the garbage collection can handle the memory thing.
timeData = new Array();
distanceData = new Array();
timeData = new Array();
thanks for your contribution.
'Delete'Hi,
Make the object to null when you feel that the use with that object has been finished.
timeData = null;
When object is null it will be cleaned by Garbage Collector.
No comments:
Post a Comment