mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
Allocator refactor
This commit is contained in:
@@ -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();
|
||||
|
Reference in New Issue
Block a user