Reserve Array


The Reserve Array node reserves memory for an array, but it doesn’t construct the array for you.

So, for example, if you try to use Set in Array you may find that it doesn’t work, because the array element you’re trying to set doesn’t exist yet. In this tree, Reserve Array gives me an array with one element. So trying to set the second element has no effect.

I’d have to use Push on Array here to get the desired result:

Or I could make sure the array elements exist like this:

I could also Resize the array after I reserve it.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s