How to clear builtin array?

Simple question is there a way to free up the memory used by a builtin array?
They can’t be resize so as a hack I’m trying this to try and re-assign it to nothing, but I have no idea if this actually does anything or is very dangerous even.
Clear() doesn’t seem to work, is there a proper way to do this?

var tmp = new Array();
vertices = tmp.ToBuiltin(Vector3);

In C# you would
tmp = null;
I think it is the same for javascript

hm, Clear() does work for me for sure, why do you think it is not working?

Because it won;t compile.

I’m talking about .NET native builtin arrays here not javascript ones.

var foo : float[];

not

var foo = new Array();

foo.Clear();

I’ll try setting it to null, wasn’t sure if that would just orphan the memory, as long as it’s cleared up by the garbage collection I guess it will be ok.

Yea just let the garbage collector handle it. Coming from C++, I’m still finding it a tad hard to trust the garbage collector all the time. However if you’re not clearing this array for object destruction, I’d assign a new, empty, array to the variable.