Magick++ 6.9.13
Loading...
Searching...
No Matches
Magick::BlobRef Class Reference
Collaboration diagram for Magick::BlobRef:

Public Member Functions

 BlobRef (const void *data_, const size_t length_)
 

Public Attributes

void * _data
 
size_t _length
 
Blob::Allocator _allocator
 
::ssize_t _refCount
 
MutexLock _mutexLock
 

Private Member Functions

 BlobRef (const BlobRef &)
 
BlobRefoperator= (const BlobRef &)
 

Detailed Description

Definition at line 21 of file BlobRef.h.

Constructor & Destructor Documentation

◆ BlobRef()

Magick::BlobRef::BlobRef ( const void * data_,
const size_t length_ )

Definition at line 18 of file BlobRef.cpp.

19 : _data(0),
20 _length(length_),
21 _allocator(Magick::Blob::NewAllocator),
22 _refCount(1),
23 _mutexLock()
24{
25 if (data_)
26 {
27 _data=new unsigned char[length_];
28 memcpy(_data,data_,length_);
29 }
30}

◆ ~BlobRef()

Magick::BlobRef::~BlobRef ( void )

Definition at line 33 of file BlobRef.cpp.

34{
35 if (_allocator == Magick::Blob::NewAllocator)
36 {
37 delete[] static_cast<unsigned char*>(_data);
38 _data=0;
39 }
40 else if (_allocator == Magick::Blob::MallocAllocator)
41 {
42 _data=(void *) RelinquishMagickMemory(_data);
43 }
44}

Member Data Documentation

◆ _allocator

Blob::Allocator Magick::BlobRef::_allocator

Definition at line 32 of file BlobRef.h.

◆ _data

void* Magick::BlobRef::_data

Definition at line 30 of file BlobRef.h.

◆ _length

size_t Magick::BlobRef::_length

Definition at line 31 of file BlobRef.h.

◆ _mutexLock

MutexLock Magick::BlobRef::_mutexLock

Definition at line 34 of file BlobRef.h.

◆ _refCount

::ssize_t Magick::BlobRef::_refCount

Definition at line 33 of file BlobRef.h.


The documentation for this class was generated from the following files: