mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
LibJS: Add Handle<T>, a strong C++ handle for keeping GC objects alive
This is pretty heavy and unoptimized, but it will do the trick for now. Basically, Heap now has a HashTable<HandleImpl*> and you can call JS::make_handle(T*) to construct a Handle<T> that guarantees that the pointee will always survive GC until the Handle<T> is destroyed.
This commit is contained in:
parent
e265058768
commit
a119b61782
6 changed files with 103 additions and 0 deletions
|
@ -1,5 +1,6 @@
|
|||
OBJS = \
|
||||
AST.o \
|
||||
Heap/Handle.o \
|
||||
Heap/Heap.o \
|
||||
Heap/HeapBlock.o \
|
||||
Interpreter.o \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue