diff --git a/deps/ox/src/ox/fs/filesystem/filelocation.cpp b/deps/ox/src/ox/fs/filesystem/filelocation.cpp index f2f5275c..76d76bd3 100644 --- a/deps/ox/src/ox/fs/filesystem/filelocation.cpp +++ b/deps/ox/src/ox/fs/filesystem/filelocation.cpp @@ -95,7 +95,7 @@ FileAddress &FileAddress::operator=(FileAddress &&other) noexcept { void FileAddress::cleanup() noexcept { if (m_type == FileAddressType::Path) { - delete[] m_data.path; + safeDeleteArray(m_data.path); clear(); } } diff --git a/deps/ox/src/ox/fs/filesystem/filesystem.hpp b/deps/ox/src/ox/fs/filesystem/filesystem.hpp index 8af58dc1..f628b73a 100644 --- a/deps/ox/src/ox/fs/filesystem/filesystem.hpp +++ b/deps/ox/src/ox/fs/filesystem/filesystem.hpp @@ -20,7 +20,7 @@ namespace ox { namespace detail { static inline void fsBuffFree(char *buff) noexcept { - delete buff; + safeDelete(buff); } } diff --git a/deps/ox/src/ox/model/desctypes.cpp b/deps/ox/src/ox/model/desctypes.cpp index ac0a6101..b3434bb9 100644 --- a/deps/ox/src/ox/model/desctypes.cpp +++ b/deps/ox/src/ox/model/desctypes.cpp @@ -12,7 +12,7 @@ namespace ox { DescriptorField::~DescriptorField() { if (ownsType) { - delete type; + safeDelete(type); } } diff --git a/deps/ox/src/ox/model/descwrite.cpp b/deps/ox/src/ox/model/descwrite.cpp index d8a72f83..538ef4eb 100644 --- a/deps/ox/src/ox/model/descwrite.cpp +++ b/deps/ox/src/ox/model/descwrite.cpp @@ -57,7 +57,7 @@ TypeDescWriter::TypeDescWriter(TypeStore *typeStore) noexcept { TypeDescWriter::~TypeDescWriter() noexcept { // does not own it's elements - delete m_typeStoreOwnerRef; + safeDelete(m_typeStoreOwnerRef); } DescriptorType *TypeDescWriter::type(int8_t*, bool *alreadyExisted) noexcept {