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

@@ -11,6 +11,7 @@
#include "GpRenderedGlyphMetrics.h"
#include "PLBigEndian.h"
#include "PLCore.h"
#include "PLDrivers.h"
#include "PLPasStr.h"
#include "DeflateCodec.h"
@@ -166,7 +167,7 @@ namespace PortabilityLayer
void RenderedFontImpl::Destroy()
{
this->~RenderedFontImpl();
free(this);
DisposePtr(this);
}
void RenderedFontImpl::SetCharData(unsigned int charID, const void *data, size_t dataOffset, const GpRenderedGlyphMetrics &metrics)
@@ -251,7 +252,7 @@ namespace PortabilityLayer
const size_t allocSize = alignedPrefixSize + glyphDataSize;
void *storage = malloc(allocSize);
void *storage = NewPtr(allocSize);
if (!storage)
return nullptr;