ucommon
Public Member Functions
ucommon::linked_allocator< T > Class Template Reference

Linked allocator template to gather linked objects. More...

#include <containers.h>

Inheritance diagram for ucommon::linked_allocator< T >:
Inheritance graph
[legend]
Collaboration diagram for ucommon::linked_allocator< T >:
Collaboration graph
[legend]

Public Member Functions

T * get (void)
 
T * get (timeout_t timeout)
 
 linked_allocator (size_t size)
 
void release (T *node)
 
- Public Member Functions inherited from ucommon::LinkedAllocator
 operator bool ()
 Test if there is still objects in the free list.
 
bool operator! ()
 Test if the free list is empty.
 

Additional Inherited Members

- Protected Member Functions inherited from ucommon::LinkedAllocator
LinkedObjectget (void)
 
LinkedObjectget (timeout_t timeout)
 
void release (LinkedObject *node)
 
- Protected Attributes inherited from ucommon::LinkedAllocator
LinkedObjectfreelist
 

Detailed Description

template<class T>
class ucommon::linked_allocator< T >

Linked allocator template to gather linked objects.

This allocates the object pool in a single array as a single heap allocation, and releases the whole pool with a single delete when done. It is also threadsafe. The types used must be derived of LinkedObject.

Author
David Sugar dyfet.nosp@m.@gnu.nosp@m.telep.nosp@m.hony.nosp@m..org

Definition at line 397 of file containers.h.


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