mirror of
https://github.com/janet-lang/janet
synced 2025-10-29 22:53:03 +00:00
Add weak references in the form of weak tables.
Any references exclusively held by a weak table may be collected without the programmer needing to free references manually. A table can be setup to have weak keys, weak values, or both.
This commit is contained in:
@@ -121,6 +121,7 @@ struct JanetVM {
|
||||
|
||||
/* Garbage collection */
|
||||
void *blocks;
|
||||
void *weak_blocks;
|
||||
size_t gc_interval;
|
||||
size_t next_collection;
|
||||
size_t block_count;
|
||||
|
||||
Reference in New Issue
Block a user