[ox] Replace delete invocations with safeDelete

This commit is contained in:
Gary Talent 2022-02-21 02:10:26 -06:00
parent 812e4b4c96
commit 8a93e44aba
4 changed files with 4 additions and 4 deletions

View File

@ -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();
}
}

View File

@ -20,7 +20,7 @@ namespace ox {
namespace detail {
static inline void fsBuffFree(char *buff) noexcept {
delete buff;
safeDelete(buff);
}
}

View File

@ -12,7 +12,7 @@ namespace ox {
DescriptorField::~DescriptorField() {
if (ownsType) {
delete type;
safeDelete(type);
}
}

View File

@ -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 {