MemoryBuffer::MemoryBuffer( const MemoryBuffer& other ) : mBytes(NULL), mSizeInBytes( other.getSizeInBytes() ), mOwnsBytes(true) { mBytes = new unsigned char[mSizeInBytes]; memcpy( mBytes, other.getBytes(), other.getSizeInBytes() ); }
bool MemoryBuffer::copyFrom( const MemoryBuffer& other ) { if ( other.getSizeInBytes()!=getSizeInBytes() ) return false; memcpy( mBytes, other.getBytes(), getSizeInBytes() ); return true; }