1.1 --- a/src/GlobalRoots.cpp Mon Sep 17 00:10:01 2012 -0700
1.2 +++ b/src/GlobalRoots.cpp Sat Nov 17 18:41:01 2012 -0800
1.3 @@ -52,7 +52,7 @@
1.4 }
1.5
1.6 HeapRoot *
1.7 -GlobalRoots::create(Handle<Object> obj)
1.8 +GlobalRoots::create()
1.9 {
1.10 HeapRoot *root = new HeapRoot();
1.11 if (!root) {
1.12 @@ -60,25 +60,15 @@
1.13 return NULL;
1.14 }
1.15
1.16 - root->obj = obj;
1.17 - root->refcount = 1;
1.18 + root->obj = NULL;
1.19
1.20 roots_.append(root);
1.21 return root;
1.22 }
1.23
1.24 void
1.25 -GlobalRoots::incref(HeapRoot *root)
1.26 +GlobalRoots::destroy(HeapRoot *root)
1.27 {
1.28 - root->refcount++;
1.29 + roots_.remove(root);
1.30 + delete root;
1.31 }
1.32 -
1.33 -void
1.34 -GlobalRoots::decref(HeapRoot *root)
1.35 -{
1.36 - assert(root->refcount > 0);
1.37 - if (--root->refcount == 0) {
1.38 - roots_.remove(root);
1.39 - delete root;
1.40 - }
1.41 -}