A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F10] Freeze-ups when constructing templated Vector containers.

  1. #1
    Senior Member rachil0's Avatar
    Join Date
    Jul 2007
    Location
    Columbus, OH.
    Posts
    465

    [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?

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,448
    Since Flash 10 is in test mode, my opinion is you should report this to Adobe. There are a number of things not working.
    - The right of the People to create Flash movies shall not be infringed. -

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center