We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 288a097 commit f112f5eCopy full SHA for f112f5e
1 file changed
engine/utils/allocators/Tlsf.cpp
@@ -75,6 +75,23 @@ TlsfAllocator<T>::TlsfAllocator(const T size)
75
AddNewBlock(paddedSize, TO_HEADER(data));
76
}
77
78
+template<typename T>
79
+TlsfAllocator<T>::~TlsfAllocator()
80
+{
81
+ if (data) free(data);
82
+
83
+ totalBytesRemaining = 0;
84
+ capacity = 0;
85
+ bytesRemaining = 0;
86
+ totalSize = 0;
87
88
+ flBitmask = 0;
89
90
+ data = nullptr;
91
+ freeList = nullptr;
92
+ slBitmasks = nullptr;
93
+}
94
95
template<typename T>
96
void TlsfAllocator<T>::CreateHeader(uint8_t* ptr, const T size, HeaderFlags flags)
97
{
0 commit comments