CommonLibSSE NG
NiTPointerAllocator.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/N/NiTCollection.h"
4 
5 namespace RE
6 {
7  template <class T>
9  {
10  public:
11  class AllocNode
12  {
13  public:
14  AllocNode* next; // 00
15  void* data; // 08
16  T element; // 10
17  };
18 
19  void* Allocate()
20  {
21  return NiMalloc(sizeof(AllocNode));
22  }
23 
24  void Deallocate(void* a_ptr)
25  {
26  return NiFree(a_ptr);
27  }
28  };
29 }
Definition: NiTPointerAllocator.h:12
AllocNode * next
Definition: NiTPointerAllocator.h:14
T element
Definition: NiTPointerAllocator.h:16
void * data
Definition: NiTPointerAllocator.h:15
Definition: NiTPointerAllocator.h:9
void * Allocate()
Definition: NiTPointerAllocator.h:19
void Deallocate(void *a_ptr)
Definition: NiTPointerAllocator.h:24
Definition: AbsorbEffect.h:6
void * NiMalloc(std::size_t a_sizeInBytes)
void NiFree(void *a_mem)