We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4ff9fb8 commit 06c8270Copy full SHA for 06c8270
1 file changed
crates/vm/src/gc_state.rs
@@ -27,7 +27,6 @@ bitflags::bitflags! {
27
}
28
29
30
-
31
/// Statistics for a single generation (gc_generation_stats)
32
#[derive(Debug, Default, Clone, Copy)]
33
pub struct GcStats {
@@ -281,6 +280,16 @@ impl GcState {
281
280
tracked.remove(&gc_ptr);
282
283
+ // Remove from permanent tracking
284
+ if let Ok(mut permanent) = self.permanent_objects.write()
285
+ && permanent.remove(&gc_ptr)
286
+ {
287
+ let count = self.permanent.count.load(Ordering::SeqCst);
288
+ if count > 0 {
289
+ self.permanent.count.fetch_sub(1, Ordering::SeqCst);
290
+ }
291
292
+
293
// Remove from finalized set
294
if let Ok(mut finalized) = self.finalized_objects.write() {
295
finalized.remove(&gc_ptr);
0 commit comments