[F10] Freeze-ups when constructing templated Vector containers.
I am working on a project in flash 10 and have been migrating away from untyped Arrays to the new Vector.<> types. However I have had problems with the flash player hanging when constructing Vector.<>'s of some of my types. Hangups are happening even before I populate the container.
Code:
var sectors : Array = new Array; // Works
Code:
var sectors : Vector.<Sector> = new Vector.<Sector> // Hangs.
I am unable to determine the minimum environment necessary to reproduce the bug - some spots in my code work fine with Vectors<>, other places are hanging unless I stick to Arrays. Does the size of the template type matter? (in terms of #properties or #bytes) It was my impression that a Vector of a non-primitive type just stores references to structures carved elsewhere on the heap, so it's basically one word of memory for each thing you push in.
Or is there something else going on here? Like does a Vector<X> of size N require space for N instances of X, or N references to instances of X? The latter is correct, right?
Using Array's, the code was working fine everywhere - I just wanted greater type safety. Anyone have similar experiences or documentation hints on what I'm doing wrong?