auto merge of #11543 : thestinger/rust/gc, r=cmr
This type isn't yet very useful since it only pretends cycles won't be a problem. Anyone using it should be made aware that they're going to leak.
This commit is contained in:
commit
f60d937dd9
@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#[allow(experimental)];
|
||||||
|
|
||||||
use kinds::Send;
|
use kinds::Send;
|
||||||
use clone::{Clone, DeepClone};
|
use clone::{Clone, DeepClone};
|
||||||
use managed;
|
use managed;
|
||||||
@ -24,6 +26,9 @@
|
|||||||
#[lang="gc"]
|
#[lang="gc"]
|
||||||
#[cfg(not(test))]
|
#[cfg(not(test))]
|
||||||
#[no_send]
|
#[no_send]
|
||||||
|
#[experimental = "Gc is currently based on reference-counting and will not collect cycles until \
|
||||||
|
task annihilation. For now, cycles need to be broken manually by using `Rc<T>` \
|
||||||
|
with a non-owning `Weak<T>` pointer. A tracing garbage collector is planned."]
|
||||||
pub struct Gc<T> {
|
pub struct Gc<T> {
|
||||||
priv ptr: @T
|
priv ptr: @T
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user