Skip to content
  • Kenneth Moreland's avatar
    ArrayHandle reallocations of 0 · 72654641
    Kenneth Moreland authored
    The basic storage has an implicit invariant that if the size of the
    storage is 0 then the array is a null pointer. That invariant was broken
    if the array was allocated and then Shrink or Allocate was called with
    0. In that case, the array remained allocated by the size was set to 0.
    
    This fixes the problem by making sure a Shrink(0) actually does an
    Allocate(0) (to clear out the data) and that the basic storage always
    frees its memory when allocating a 0 sized array.
    72654641