mirror of https://github.com/zeldaret/tp.git
18 lines
383 B
C++
18 lines
383 B
C++
#include "JSystem/JKernel/JKRDisposer/JKRDisposer.h"
|
|
#include "JSystem/JKernel/JKRHeap/JKRHeap.h"
|
|
#include "global.h"
|
|
|
|
JKRDisposer::JKRDisposer() : mLink(this) {
|
|
mHeap = JKRHeap::findFromRoot(this);
|
|
if (mHeap) {
|
|
mHeap->appendDisposer(this);
|
|
}
|
|
}
|
|
|
|
JKRDisposer::~JKRDisposer() {
|
|
JKRHeap* heap = mHeap;
|
|
if (heap) {
|
|
heap->removeDisposer(this);
|
|
}
|
|
}
|