webkit  2cdf99a9e3038c7e01b3c37e8ad903ecbe5eecf1
https://github.com/WebKit/webkit
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Classes | Public Member Functions | List of all members
Json::BatchAllocator< AllocatedType, objectPerAllocation > Class Template Reference

#include <json_batchallocator.h>

Public Member Functions

 BatchAllocator (unsigned int objectsPerPage=255)
 
 ~BatchAllocator ()
 
AllocatedType * allocate ()
 
void release (AllocatedType *object)
 

Constructor & Destructor Documentation

◆ BatchAllocator()

template<typename AllocatedType, const unsigned int objectPerAllocation>
Json::BatchAllocator< AllocatedType, objectPerAllocation >::BatchAllocator ( unsigned int  objectsPerPage = 255)
inline

◆ ~BatchAllocator()

template<typename AllocatedType, const unsigned int objectPerAllocation>
Json::BatchAllocator< AllocatedType, objectPerAllocation >::~BatchAllocator ( )
inline

Member Function Documentation

◆ allocate()

template<typename AllocatedType, const unsigned int objectPerAllocation>
AllocatedType* Json::BatchAllocator< AllocatedType, objectPerAllocation >::allocate ( )
inline

allocate space for an array of objectPerAllocation object.

Warning
it is the responsability of the caller to call objects constructors.

◆ release()

template<typename AllocatedType, const unsigned int objectPerAllocation>
void Json::BatchAllocator< AllocatedType, objectPerAllocation >::release ( AllocatedType *  object)
inline

Release the object.

Warning
it is the responsability of the caller to actually destruct the object.

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