Bug in AudioBuffer<>


I don’t really believe there’s a bug in this but:

If other.channels points to other.preAllocatedChannel space then what happens after other is deleted here? I think channels may left hanging … unless i’m missing something

/** Move constructor */
AudioBuffer (AudioBuffer&& other) noexcept
    : numChannels (other.numChannels),
      size (other.size),
      allocatedBytes (other.allocatedBytes),
      channels (other.channels),
      allocatedData (static_cast<HeapBlock<char, true>&&> (other.allocatedData)),
      isClear (other.isClear)
    memcpy (preallocatedChannelSpace, other.preallocatedChannelSpace, sizeof (preallocatedChannelSpace));
    other.numChannels = 0;
    other.size = 0;
    other.allocatedBytes = 0;


Yeah that doesn’t look right. Fixed on develop with commit 35facc3.