Skip to content

Commit 73e546c

Browse files
committed
update weak clean
1 parent 49cdbcd commit 73e546c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/luars/src/gc/mod.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,9 @@ impl GC {
780780
self.mark_one(gc_id, pool);
781781
}
782782

783+
// Clear weak table entries before sweep
784+
self.clear_weak_tables(pool);
785+
783786
// Sweep young objects and age them
784787
let collected = self.sweep_young(pool);
785788
self.stats.objects_collected += collected;
@@ -951,6 +954,8 @@ impl GC {
951954
// Do a full mark-sweep
952955
self.clear_marks(pool);
953956
self.mark_roots(roots, pool);
957+
// Clear weak table entries before sweep
958+
self.clear_weak_tables(pool);
954959
let collected = self.sweep(pool);
955960

956961
// Reset generational state

0 commit comments

Comments
 (0)