refuse 0.0.6

An easy-to-use, incremental, multi-threaded garbage collector
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
use refuse::{CollectionGuard, Ref};

#[test]
fn lifecycle() {
    let mut guard = CollectionGuard::acquire();
    let collected = Ref::new(42_u32, &guard);

    assert_eq!(collected.load(&guard), Some(&42));

    guard.collect();

    assert_eq!(collected.load(&guard), None);
}