|
NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
|
#include <lib/egg/core/eggDisposer.h>
Interface for a garbage collector.
When a heap is destroyed, its managing memory is implicitly freed. However, the destructors of objects are never explicitly called when this happens. To solve this, heaps have a linked list for classes that can opt-in for explicit destruction.
To opt a class in for memory management, privately inherit this class.
Definition at line 18 of file eggDisposer.h.
Public Member Functions | |
| Disposer () | |
| Registers the disposer in the containing heap. | |
| virtual | ~Disposer () |
| Unregisters the disposer in the containing heap. | |
Private Attributes | |
| Heap * | mHeap |
| Heap in which the disposer is allocated, or NULL otherwise. | |
| nw4r::ut::Link | mLink |
| Link for the heap's linked list. Managed by the containing heap. | |
| EGG::Disposer::Disposer | ( | ) |
Registers the disposer in the containing heap.
Definition at line 6 of file eggDisposer.cpp.
|
virtual |
Unregisters the disposer in the containing heap.
Definition at line 13 of file eggDisposer.cpp.
|
private |
Heap in which the disposer is allocated, or NULL otherwise.
Definition at line 27 of file eggDisposer.h.
|
private |
Link for the heap's linked list. Managed by the containing heap.
Definition at line 28 of file eggDisposer.h.