Fix memory leak in flow tree by adding weak refs.

Cycles were being created in the flow tree since absolutely positioned
descendants had pointers to their containing blocks. This adds
WeakFlowRef (based on Weak<T>) and makes these backpointers weak
references. This also harmonizes our custom Arc<T>, FlowRef, to be
consistent with the upstream implementation.

Fixes #4915.
This commit is contained in:
Jack Moffitt 2015-03-12 16:32:49 -06:00
parent 660ea05ddb
commit 237150fa49
4 changed files with 147 additions and 18 deletions

View file

@ -49,6 +49,7 @@ extern crate util;
extern crate string_cache_macros;
extern crate string_cache;
extern crate alloc;
extern crate collections;
extern crate encoding;
extern crate libc;