mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 03:59:36 +00:00
Allocator refactor
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user