feat(memory): add STORM_FREE macro

This commit is contained in:
Adam Heinermann 2025-09-12 21:53:57 -07:00 committed by fallenoak
parent 05f8a7eebf
commit 547fc6d4f0
6 changed files with 30 additions and 8 deletions

View file

@ -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__);