Replaced memory with new.

Cleaned up gdrv, zdrv, render.
This commit is contained in:
oz
2021-10-02 17:45:31 +03:00
parent dc5915b4f8
commit 93de90b680
25 changed files with 220 additions and 439 deletions

View File

@@ -1,7 +1,6 @@
#include "pch.h"
#include "timer.h"
#include "memory.h"
#include "pb.h"
int timer::SetCount;
@@ -13,7 +12,7 @@ timer_struct* timer::TimerBuffer;
int timer::init(int count)
{
auto buf = memory::allocate<timer_struct>(count);
auto buf = new timer_struct[count];
TimerBuffer = buf;
if (!buf)
return 1;
@@ -32,8 +31,7 @@ int timer::init(int count)
void timer::uninit()
{
if (TimerBuffer)
memory::free(TimerBuffer);
delete[] TimerBuffer;
TimerBuffer = nullptr;
}