# ZeroedMemoryAllocator Class Reference

Base class that provides memory initialization on dynamically created objects. More...

`#include <alloc_type.hpp>`

Inheritance diagram for ZeroedMemoryAllocator:

## Public Member Functions
FORCEINLINE void * | operator new (size_t size)
| Memory allocator for a single class instance.
FORCEINLINE void * | operator new[] (size_t size)
| Memory allocator for an array of class instances.
FORCEINLINE void | operator delete (void *ptr, size_t size)
| Memory release for a single class instance.
FORCEINLINE void | operator delete[] (void *ptr, size_t size)
| Memory release for an array of class instances.

## Detailed Description

Base class that provides memory initialization on dynamically created objects.

All allocated memory will be zeroed.

Definition at line 143 of file alloc_type.hpp.

## Member Function Documentation

FORCEINLINE void* ZeroedMemoryAllocator::operator new | ( | size_t | size | ) | `[inline]`

Memory allocator for a single class instance.

Parameters:

  | size | the amount of bytes to allocate.

Returns:
  the given amounts of bytes zeroed.

Definition at line 154 of file alloc_type.hpp.

FORCEINLINE void* ZeroedMemoryAllocator::operator new[] | ( | size_t | size | ) | `[inline]`

Memory allocator for an array of class instances.

Parameters:

  | size | the amount of bytes to allocate.

Returns:
  the given amounts of bytes zeroed.

Reimplemented in Window.

Definition at line 161 of file alloc_type.hpp.

FORCEINLINE void ZeroedMemoryAllocator::operator delete | ( | void * | ptr,
|  | size_t | size |
| ) |  |  | `[inline]`

Memory release for a single class instance.

Parameters:

  | ptr | the memory to free.
  | size | the amount of allocated memory (unused).

Warning:
  The value of the size parameter can only be trusted for classes that have their own (virtual) destructor method.

Reimplemented in Window.

Definition at line 171 of file alloc_type.hpp.

FORCEINLINE void ZeroedMemoryAllocator::operator delete[] | ( | void * | ptr,
|  | size_t | size |
| ) |  |  | `[inline]`

Memory release for an array of class instances.

Parameters:

  | ptr | the memory to free.
  | size | the amount of allocated memory (unused).

Warning:
  The value of the size parameter can only be trusted for classes that have their own (virtual) destructor method.

Definition at line 181 of file alloc_type.hpp.

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

- src/core/alloc_type.hpp