Skip to content
  • Kenneth Moreland's avatar
    Make ArrayHandle work better when uninitialized · c224c2b9
    Kenneth Moreland authored
    Fixed a problem where ArrayHandle would cause a crash if you tried to
    get the control portal on an uninitialized array (it was supposed to
    throw an exception).
    
    Also changed some methods in ArrayHandle so that they work resonably
    without error when used with an uninitialized array. Specifically, the
    aforementioned behavior was changed to "allocate" an array of size 0
    (that is, call Allocate(0) on the storage object) to return an empty
    array portal rather than throw an error. Although this use of
    ArrayHandle can be considered erroneous, it is convenient the get an
    empty array portal when dealing with a potentially unallocated array
    rather than create a special condition.
    c224c2b9