This happens everytime i create a MemoryBlock and try to return it as a copy from a function:
MemoryBlock::~MemoryBlock() noexcept
{
jassert (size >= 0); // should never happen
jassert (size == 0 || data != nullptr); // non-zero size but no data allocated? <-- THIS HAPPENS
}
but for example this also happens when i do:
BigInteger bi;
r.fillBitsRandomly(bi, 0, 64);
MD5 md5(bi.toMemoryBlock());
Is there something i’m missing ?