Last active
April 25, 2016 12:28
-
-
Save neilmanuell/6bfe6b94e1a32e7f74987e8eab331a5d to your computer and use it in GitHub Desktop.
do these have the same memory optimisations.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//create dynamic vector and fix | |
private var _items:Vector.<uint> = new <uint>[]; | |
_items.push(1); | |
_items.push(2); | |
_items.push(3); | |
_items.push(4); | |
_items.push(5); | |
_items.fixed = true; | |
//create static vector | |
private var _items:Vector.<uint> = new Vector.<uint>(5,true); | |
_items[0]=1; | |
_items[1]=2; | |
_items[2]=3; | |
_items[3]=4; | |
_items[4]=5; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment