struct CCL::IAllocator

Overview

Memory allocation interface. More…

#include <iallocator.h>

struct IAllocator: public CCL::IUnknown
{
    // methods

    virtual void*CCL_API allocate (unsigned int size) = 0;
    virtual void*CCL_API reallocate (void* ptr, unsigned int size) = 0;
    virtual void CCL_API dispose (void* ptr) = 0;
};

Inherited Members

public:
    // methods

    virtual tresult CCL_API queryInterface (UIDRef iid, void** ptr) = 0;
    virtual unsigned int CCL_API retain () = 0;
    virtual unsigned int CCL_API release () = 0;

Detailed Documentation

Memory allocation interface.

Methods

virtual void*CCL_API allocate (unsigned int size) = 0

Allocate memory block of given size.

Returns memory address in case of success or null otherwise.

virtual void*CCL_API reallocate (void* ptr, unsigned int size) = 0

Resize existing memory block.

Returns new memory address in case of success or null otherwise.

virtual void CCL_API dispose (void* ptr) = 0

Dispose a previously allocated memory block.