Reviewers: Vladislav Kaznacheev,

Message:
Vlad,

may you have a look?

yours,
anton.

Description:
Releasing allocated chunks in Pool's destructor.

That should make it not leak if v8 wasn't intialized at all.

Please review this at http://codereview.chromium.org/3048034/show

Affected files:
  M src/global-handles.cc


Index: src/global-handles.cc
diff --git a/src/global-handles.cc b/src/global-handles.cc
index 573669a4572b813c85bc613ebe176389d3da5886..f089b85e1ab75f018f2cba05662e606222c6bef1 100644
--- a/src/global-handles.cc
+++ b/src/global-handles.cc
@@ -226,6 +226,12 @@ class GlobalHandles::Pool BASE_EMBEDDED {
       limit_ = current_->nodes + kNodesPerChunk;
     }

+    ~Pool() {
+      if (current_ != NULL) {
+        Release();
+      }
+    }
+
     Node* Allocate() {
       if (next_ < limit_) {
         return next_++;


--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to