simple memory manager for utilmm::smart::ref_count::manager More...
#include <simple_memory.hh>
Public Types | |
| typedef Ty | base_type |
| Real type for memory cells. | |
| typedef std::pair< base_type, size_t > | cell_type |
| memory cell type | |
| typedef cell_type * | mem_cell |
| public memory cell type | |
Public Member Functions | |
| mem_cell | create (base_type *ptr) |
| Attachment of a new pointer. | |
| void | destroy (mem_cell c) |
| Destroy a memory cell. | |
| mem_cell | null_cell () |
| null cell creation | |
simple memory manager for utilmm::smart::ref_count::manager
This class implements the simplest memory manager we can use for utilmm::smart::ref_count::manager class. This manager will just delete the pointed cell when the manager request for it.
| Ty | The type of managed cells |
Definition at line 30 of file simple_memory.hh.
| typedef Ty utilmm::smart::ref_count::simple_memory< Ty >::base_type |
Real type for memory cells.
Definition at line 32 of file simple_memory.hh.
| typedef std::pair<base_type, size_t> utilmm::smart::ref_count::simple_memory< Ty >::cell_type |
memory cell type
Definition at line 34 of file simple_memory.hh.
| typedef cell_type* utilmm::smart::ref_count::simple_memory< Ty >::mem_cell |
public memory cell type
Definition at line 36 of file simple_memory.hh.
| mem_cell utilmm::smart::ref_count::simple_memory< Ty >::create | ( | base_type * | ptr | ) | [inline] |
Attachment of a new pointer.
This function adds a new pointer to the memory management.
| ptr | The pointer to manage |
Definition at line 61 of file simple_memory.hh.
| void utilmm::smart::ref_count::simple_memory< Ty >::destroy | ( | mem_cell | c | ) | [inline] |
Destroy a memory cell.
This function Will detroy a memory cell and the real pointed value
| c | The cell to destroy |
Definition at line 72 of file simple_memory.hh.
| mem_cell utilmm::smart::ref_count::simple_memory< Ty >::null_cell | ( | ) | [inline] |
null cell creation
This function create the cell corresponding to null
Definition at line 44 of file simple_memory.hh.