gc: Fix for deallocating resources on the shared heap while cleaning stack.

This commit is contained in:
Elliott Slaughter 2012-08-22 16:55:48 -07:00
parent 3405c548e8
commit 88f5ab3163

View File

@ -113,7 +113,8 @@ unsafe fn walk_gc_roots(mem: Memory, visitor: Visitor) {
let refcount = **root;
if mem | task_local_heap != 0 && refcount != -1 {
if !visitor(root, tydesc) { return; }
} else if mem | exchange_heap != 0 {
} else if mem | exchange_heap != 0
&& refcount == -1 {
if !visitor(root, tydesc) { return; }
}
} else {