Allocator refactor

This commit is contained in:
elasota
2021-04-28 01:46:07 -04:00
parent 472462c535
commit a2d374f650
75 changed files with 473 additions and 253 deletions

View File

@@ -1,5 +1,6 @@
#include "InflateStream.h"
#include "DeflateCodec.h"
#include "PLCore.h"
#include <stdlib.h>
#include <new>
@@ -225,7 +226,7 @@ namespace PortabilityLayer
void InflateStreamImpl::GP_ASYNCIFY_PARANOID_NAMED(Close)()
{
this->~InflateStreamImpl();
free(this);
DisposePtr(this);
}
void InflateStreamImpl::Flush()
@@ -238,7 +239,7 @@ namespace PortabilityLayer
if (!inflateContext)
return nullptr;
void *storage = malloc(sizeof(InflateStreamImpl));
void *storage = NewPtr(sizeof(InflateStreamImpl));
if (!storage)
{
inflateContext->Destroy();