mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-27 15:42:42 -04:00
89f4055593
* becomeSystemHeap OK! becomeCurrentHeap OK! * initArena OK! * static-alloc OK! static-free OK! static-resize OK! * operator new OK! operator delete OK! * removed asm/d/file/sel/d_file_sel_info.o from obj_files.mk * fixed vtable names
28 lines
767 B
C++
28 lines
767 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() : __vt(&lbl_803CC0F0), ptr_link(this) {
|
|
this->heap = JKRHeap::findFromRoot(this);
|
|
if (this->heap != 0) {
|
|
this->heap->disposable_list.append(&this->ptr_link);
|
|
}
|
|
}
|
|
|
|
// Almost. Missing three instructions, something
|
|
// to do with the destruction of JSUPtrLink
|
|
#ifdef NONMATCHING
|
|
JKRDisposer::~JKRDisposer() {
|
|
this->__vt = lbl_803CC0F0;
|
|
if (this->heap != NULL) {
|
|
this->heap->disposable_list.remove(&this->ptr_link);
|
|
}
|
|
}
|
|
#else
|
|
asm JKRDisposer::~JKRDisposer() {
|
|
nofralloc
|
|
#include "JSystem/JKernel/JKRDisposer/asm/func_802D14E4.s"
|
|
}
|
|
#endif
|