Skip to content

Instantly share code, notes, and snippets.

@neilmanuell
Last active April 25, 2016 12:28
Show Gist options
  • Save neilmanuell/6bfe6b94e1a32e7f74987e8eab331a5d to your computer and use it in GitHub Desktop.
Save neilmanuell/6bfe6b94e1a32e7f74987e8eab331a5d to your computer and use it in GitHub Desktop.
do these have the same memory optimisations.
//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