pub type Cc<T> = RawCc<T, ObjectSpace>;
Expand description
A single-threaded reference-counting pointer that integrates with cyclic garbage collection.
See module level documentation for more details.
Cc
is not thread-safe. It does not implement Send
or Sync
:
ⓘ
use std::ops::Deref;
use gcmodule::Cc;
let cc = Cc::new(5);
std::thread::spawn(move || {
println!("{}", cc.deref());
});
Aliased Type§
struct Cc<T>(/* private fields */);