[nostalgia] Replace delete with safeDelete

This commit is contained in:
Gary Talent 2022-02-21 02:21:03 -06:00
parent eea466750c
commit 3dd60965c4
4 changed files with 4 additions and 4 deletions

View File

@ -58,7 +58,7 @@ ox::Error run(Context *ctx) noexcept {
renderer::shutdown(ctx, ctx->rendererData<void>());
glfwDestroyWindow(id->window);
ctx->setWindowerData(nullptr);
delete id;
ox::safeDelete(id);
return OxError(0);
}

View File

@ -196,7 +196,7 @@ ox::Error init(Context *ctx, void **rendererData) noexcept {
void shutdown(Context*, void *rendererData) noexcept {
const auto id = reinterpret_cast<GlImplData*>(rendererData);
delete id;
ox::safeDelete(id);
}
void loadBgTexture(void *rendererData, int section, void *pixels, int w, int h) noexcept {

View File

@ -29,7 +29,7 @@ ox::Result<char*> loadRom(const char *path) noexcept {
}
void unloadRom(char *rom) noexcept {
delete rom;
ox::safeDelete(rom);
}
}

View File

@ -17,7 +17,7 @@ ox::Error Zone::init(Context *ctx, Bounds bnds, ox::FileAddress tileSheet, ox::F
}
Zone::~Zone() {
delete[] m_tiles;
ox::safeDeleteArray(m_tiles);
}
void Zone::draw(Context *ctx) {