Files
tp/libs/JSystem/JKernel/JKRDisposer.cpp
T
Jonathan Wase 4adfed901e JSUList.h templates and JKRHeap matches (#13)
* JSULink, JSUList, JSUTree and more matching in JKRHeap

* Added JSUListIterator and decompiled JKRHeap::dispose_subroutine

* more templates and JKRHeap functions

* JKRDisposer!

* only 4 functions not OK in JKRHeap

* fixed: *this->getObject()

Co-authored-by: Pheenoh <pheenoh@gmail.com>
2020-12-03 21:02:41 -05:00

20 lines
519 B
C++

#include "JSystem/JKernel/JKRDisposer/JKRDisposer.h"
#include "global.h"
#include "JSystem/JKernel/JKRHeap/JKRHeap.h"
// #include "JSystem/JKernel/asm/func_802D147C.s"
JKRDisposer::JKRDisposer() : mLink(this) {
this->mHeap = JKRHeap::findFromRoot(this);
if (this->mHeap) {
this->mHeap->appendDisposer(this);
}
}
// #include "JSystem/JKernel/JKRDisposer/asm/func_802D14E4.s"
JKRDisposer::~JKRDisposer() {
JKRHeap* heap = this->mHeap;
if (heap) {
heap->removeDisposer(this);
}
}