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

@@ -7,6 +7,7 @@
#include "MemReaderStream.h"
#include "MemoryManager.h"
#include "PLCore.h"
#include "PLDrivers.h"
#include <stdlib.h>
@@ -158,7 +159,7 @@ namespace PortabilityLayer
FontFamily *FontFamily::Create(FontFamilyID_t familyID)
{
void *storage = malloc(sizeof(FontFamily));
void *storage = NewPtr(sizeof(FontFamily));
if (!storage)
return nullptr;
@@ -168,7 +169,7 @@ namespace PortabilityLayer
void FontFamily::Destroy()
{
this->~FontFamily();
free(this);
DisposePtr(this);
}
FontFamily::FontFamily(FontFamilyID_t familyID)