This source file includes following definitions.
- _mutexLock
#define MAGICKCORE_IMPLEMENTATION 1
#define MAGICK_PLUSPLUS_IMPLEMENTATION 1
#include "Magick++/Include.h"
#include "Magick++/Thread.h"
#include "Magick++/BlobRef.h"
#include <string.h>
Magick::BlobRef::BlobRef(const void* data_,const size_t length_)
: _data(0),
_length(length_),
_allocator(Magick::Blob::NewAllocator),
_refCount(1),
_mutexLock()
{
if (data_)
{
_data=new unsigned char[length_];
memcpy(_data,data_,length_);
}
}
Magick::BlobRef::~BlobRef(void)
{
if (_allocator == Magick::Blob::NewAllocator)
{
delete[] static_cast<unsigned char*>(_data);
_data=0;
}
else if (_allocator == Magick::Blob::MallocAllocator)
{
_data=(void *) RelinquishMagickMemory(_data);
}
}