AuroraRuntime/Source/Memory/AuHeapDeletable.cpp

28 lines
532 B
C++

/***
Copyright (C) 2021-2024 J Reece Wilson (a/k/a "Reece"). All rights reserved.
File: AuHeapDeletable.cpp
File: AuHeap.cpp
Date: 2021-6-12
Author: Reece
***/
#include <Source/RuntimeInternal.hpp>
#include "AuHeapDeletable.hpp"
namespace Aurora::Memory
{
DeletableHeap::DeletableHeap(Heap *pParent, void *ptr) :
pParent(pParent),
ptr2_(ptr)
{
}
DeletableHeap::~DeletableHeap()
{
if (this->ptr2_)
{
pParent->Free(this->ptr2_);
}
}
}