changeset 65:109d9927c805

Fixed the leaking root bug.
author Atul Varma <varmaa@toolness.com>
date Thu, 25 Jun 2009 12:07:17 -0700
parents 6a7e87cd1588
children c0d5fa0d3b9f
files memory_profiler.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/memory_profiler.cpp	Thu Jun 25 11:46:43 2009 -0700
+++ b/memory_profiler.cpp	Thu Jun 25 12:07:17 2009 -0700
@@ -210,6 +210,9 @@
     }
   }
 
+  // Unroot roots set by JS_GetPropertyDescArray().
+  JS_PutPropertyDescArray(targetCx, &properties);
+
   return JS_TRUE;
 }