AuroraRuntime/Source/Memory/AuHeapDeletable.cpp

28 lines
532 B
C++
Raw Normal View History

2024-03-19 15:47:42 +00:00
/***
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
{
2024-03-21 00:28:50 +00:00
DeletableHeap::DeletableHeap(Heap *pParent, void *ptr) :
2024-03-19 15:47:42 +00:00
pParent(pParent),
ptr2_(ptr)
{
}
DeletableHeap::~DeletableHeap()
{
if (this->ptr2_)
{
pParent->Free(this->ptr2_);
}
}
}