MeVisLab Toolbox Reference
MLWeakMemoryBlockHandle Class Reference

The weak handle of a MLMemoryBlock. More...

#include <mlWeakMemoryBlockHandle.h>

Public Member Functions

 MLWeakMemoryBlockHandle ()
 Creates a weak memory block handle that is null.
 
 MLWeakMemoryBlockHandle (const MLMemoryBlockHandle &memoryBlockHandle)
 Creates a weak memory block handle from the the strong handle.
 
 MLWeakMemoryBlockHandle (const MLWeakMemoryBlockHandle &weakMemoryBlockHandle)
 Creates a weak memory block handle from another weak handle.
 
 ~MLWeakMemoryBlockHandle ()
 If this is the last weak handle of the memory block, and no strong handle references it, then the memory block is removed from the cache list and deleted.
 
void clear ()
 Releases this handle from the memory block.
 
bool deletionOngoing () const
 
MLWeakMemoryBlockHandleoperator= (const MLMemoryBlockHandle &memoryBlockHandle)
 Creates a weak memory block handle from the memory block handle.
 
MLWeakMemoryBlockHandleoperator= (const MLWeakMemoryBlockHandle &weakMemoryBlockHandle)
 Creates a weak memory block handle from the memory block handle.
 
bool isNull () const
 Returns true if the weak memory block references a NULL memory block.
 

Detailed Description

The weak handle of a MLMemoryBlock.

It is used to keep a reference to memory blocks in the cache list, but you cannot access the memory block until you assign this weak handle to a strong handle of type MLMemoryBlockHandle.

Definition at line 26 of file mlWeakMemoryBlockHandle.h.

Constructor & Destructor Documentation

◆ MLWeakMemoryBlockHandle() [1/3]

MLWeakMemoryBlockHandle::MLWeakMemoryBlockHandle ( )

Creates a weak memory block handle that is null.

◆ MLWeakMemoryBlockHandle() [2/3]

MLWeakMemoryBlockHandle::MLWeakMemoryBlockHandle ( const MLMemoryBlockHandle & memoryBlockHandle)

Creates a weak memory block handle from the the strong handle.

If the memory block of strong handle is no more referenced by any strong handle, then it is added to the cache list.

◆ MLWeakMemoryBlockHandle() [3/3]

MLWeakMemoryBlockHandle::MLWeakMemoryBlockHandle ( const MLWeakMemoryBlockHandle & weakMemoryBlockHandle)

Creates a weak memory block handle from another weak handle.

◆ ~MLWeakMemoryBlockHandle()

MLWeakMemoryBlockHandle::~MLWeakMemoryBlockHandle ( )

If this is the last weak handle of the memory block, and no strong handle references it, then the memory block is removed from the cache list and deleted.

Member Function Documentation

◆ clear()

void MLWeakMemoryBlockHandle::clear ( )

Releases this handle from the memory block.

See also
isNull()

◆ deletionOngoing()

bool MLWeakMemoryBlockHandle::deletionOngoing ( ) const

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