Is this a safe way to clear an array?

BlitzMax Forums/BlitzMax Programming/Is this a safe way to clear an array?

The Forum Archive is locked. These are the original blitzbasic.com forums, kept so their posts can still be read and searched. No new topics, replies or edits can be made here. To join the conversation, head over to the Blitz3D+ forums.

myarray = myarray[..0]

It works, so is it cool from a GC point of view?

If I rexpand the array with myarray = myarray[..1] any data I stored in slot [0] has indeed disappeared so it works e.g.

Strict

Local test$[]

test = test[..1]
test[0] = "hello"

test = test[..0]
test = test[..1]

Print test[0]