[ox] Replace delete invocations with safeDelete
This commit is contained in:
parent
812e4b4c96
commit
8a93e44aba
@ -95,7 +95,7 @@ FileAddress &FileAddress::operator=(FileAddress &&other) noexcept {
|
|||||||
|
|
||||||
void FileAddress::cleanup() noexcept {
|
void FileAddress::cleanup() noexcept {
|
||||||
if (m_type == FileAddressType::Path) {
|
if (m_type == FileAddressType::Path) {
|
||||||
delete[] m_data.path;
|
safeDeleteArray(m_data.path);
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
2
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
2
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@ -20,7 +20,7 @@ namespace ox {
|
|||||||
|
|
||||||
namespace detail {
|
namespace detail {
|
||||||
static inline void fsBuffFree(char *buff) noexcept {
|
static inline void fsBuffFree(char *buff) noexcept {
|
||||||
delete buff;
|
safeDelete(buff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
deps/ox/src/ox/model/desctypes.cpp
vendored
2
deps/ox/src/ox/model/desctypes.cpp
vendored
@ -12,7 +12,7 @@ namespace ox {
|
|||||||
|
|
||||||
DescriptorField::~DescriptorField() {
|
DescriptorField::~DescriptorField() {
|
||||||
if (ownsType) {
|
if (ownsType) {
|
||||||
delete type;
|
safeDelete(type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
2
deps/ox/src/ox/model/descwrite.cpp
vendored
2
deps/ox/src/ox/model/descwrite.cpp
vendored
@ -57,7 +57,7 @@ TypeDescWriter::TypeDescWriter(TypeStore *typeStore) noexcept {
|
|||||||
|
|
||||||
TypeDescWriter::~TypeDescWriter() noexcept {
|
TypeDescWriter::~TypeDescWriter() noexcept {
|
||||||
// does not own it's elements
|
// does not own it's elements
|
||||||
delete m_typeStoreOwnerRef;
|
safeDelete(m_typeStoreOwnerRef);
|
||||||
}
|
}
|
||||||
|
|
||||||
DescriptorType *TypeDescWriter::type(int8_t*, bool *alreadyExisted) noexcept {
|
DescriptorType *TypeDescWriter::type(int8_t*, bool *alreadyExisted) noexcept {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user