pub struct ConservativeGC { /* private fields */ }Expand description
Conservative garbage collector for heap-allocated objects Currently operates alongside Rc-based memory management
Implementations§
Source§impl ConservativeGC
impl ConservativeGC
Sourcepub fn track_object(&mut self, value: Value) -> usize
pub fn track_object(&mut self, value: Value) -> usize
Add an object to GC tracking
Sourcepub fn collect_garbage(&mut self) -> GCStats
pub fn collect_garbage(&mut self) -> GCStats
Perform garbage collection using conservative stack scanning
Sourcepub fn set_collection_threshold(&mut self, threshold: usize)
pub fn set_collection_threshold(&mut self, threshold: usize)
Set collection threshold
Sourcepub fn set_auto_collect(&mut self, enabled: bool)
pub fn set_auto_collect(&mut self, enabled: bool)
Enable or disable automatic collection
Sourcepub fn force_collect(&mut self) -> GCStats
pub fn force_collect(&mut self) -> GCStats
Force garbage collection
Trait Implementations§
Source§impl Debug for ConservativeGC
impl Debug for ConservativeGC
Auto Trait Implementations§
impl Freeze for ConservativeGC
impl RefUnwindSafe for ConservativeGC
impl !Send for ConservativeGC
impl !Sync for ConservativeGC
impl Unpin for ConservativeGC
impl UnwindSafe for ConservativeGC
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more