BDE 4.39.x Production Release
Loading...
Searching...
No Matches
bslma::InfrequentDeleteBlockList Class Reference

#include <bslma_infrequentdeleteblocklist.h>

Detailed Description

This class implements a memory manager that allocates and manages a sequence of memory blocks, each potentially of a different size as specified in the allocate method's invocation. This object's release method deallocates the entire sequence of memory blocks, as does its destructor.

Note
Note that memory blocks can not be deallocated individually.

See bslma_infrequentdeleteblocklist

Public Member Functions

 InfrequentDeleteBlockList (Allocator *basicAllocator=0)
 
 ~InfrequentDeleteBlockList ()
 
void * allocate (int numBytes)
 
void deallocate (void *address)
 
void release ()
 

Constructor & Destructor Documentation

◆ InfrequentDeleteBlockList()

bslma::InfrequentDeleteBlockList::InfrequentDeleteBlockList ( Allocator basicAllocator = 0)
inlineexplicit

Create a memory manager. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used.

◆ ~InfrequentDeleteBlockList()

bslma::InfrequentDeleteBlockList::~InfrequentDeleteBlockList ( )

Destroy this object and deallocate all memory blocks managed by this object.

Member Function Documentation

◆ allocate()

void * bslma::InfrequentDeleteBlockList::allocate ( int  numBytes)

Allocate a memory block of the specified numBytes size and return its address. The returned memory is guaranteed to be maximally aligned.

Precondition
The behavior is undefined unless 0 <= numBytes.

◆ deallocate()

void bslma::InfrequentDeleteBlockList::deallocate ( void *  address)
inline

This method has no effect.

◆ release()

void bslma::InfrequentDeleteBlockList::release ( )

Deallocate all memory blocks managed by this object.


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