mirror of
https://github.com/thunderbrewhq/squall.git
synced 2026-02-04 00:49:08 +00:00
feat(memory): add STORM_FREE macro
This commit is contained in:
parent
05f8a7eebf
commit
547fc6d4f0
6 changed files with 30 additions and 8 deletions
|
|
@ -37,14 +37,14 @@ HASHKEY_STR::HASHKEY_STR(const char* str) {
|
|||
|
||||
HASHKEY_STR::~HASHKEY_STR() {
|
||||
if (this->m_str) {
|
||||
SMemFree(this->m_str, __FILE__, __LINE__);
|
||||
STORM_FREE(this->m_str);
|
||||
}
|
||||
}
|
||||
|
||||
HASHKEY_STR& HASHKEY_STR::operator=(const char* str) {
|
||||
if (this->m_str != str) {
|
||||
if (this->m_str) {
|
||||
SMemFree(this->m_str, __FILE__, __LINE__);
|
||||
STORM_FREE(this->m_str);
|
||||
}
|
||||
|
||||
this->m_str = SStrDupA(str, __FILE__, __LINE__);
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ void TSHashTable<T, TKey>::InternalClear(int32_t warn) {
|
|||
template <class T, class TKey>
|
||||
void TSHashTable<T, TKey>::InternalDelete(T* ptr) {
|
||||
ptr->~T();
|
||||
SMemFree(ptr, __FILE__, __LINE__, 0x0);
|
||||
STORM_FREE(ptr);
|
||||
}
|
||||
|
||||
template <class T, class TKey>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue