Wintermute Engine Forum
Wintermute Engine => Technical forum => Topic started by: Dan Peach on May 06, 2016, 10:09:27 PM
-
Hello :)
I have an array that I use to pass some information to a method. Once the method has done, I want to empty the array so that I can use it again. How to empty it?
Thanks. :)
Dan.
-
Hi Dan. You can simply reassign the variable it a new array:
arrayVariable =
new Array();
or you can set Lenght to 0 (I haven't tested this, it's according to the documentation):
-
Thank you. The second one worked. ;D
-
Would arrayVariable.Length = null; work also ?