mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 18:02:20 +00:00
Doing things in the destructor of a GC-allocated object isn't always safe, in case it involves accessing other GC-allocated objects. If they were already swept by GC, we'd be poking into freed memory. This patch adds a separate finalization pass where GC calls finalize() on every unmarked cell that's about to be deleted. It's safe to access other GC objects in finalize(), even if they're also unmarked. |
||
---|---|---|
.. | ||
BlockAllocator.cpp | ||
BlockAllocator.h | ||
Cell.h | ||
CellAllocator.cpp | ||
CellAllocator.h | ||
DeferGC.h | ||
GCPtr.h | ||
Handle.cpp | ||
Handle.h | ||
Heap.cpp | ||
Heap.h | ||
HeapBlock.cpp | ||
HeapBlock.h | ||
MarkedVector.cpp | ||
MarkedVector.h |