Commit 10b847eb authored by antonm@chromium.org's avatar antonm@chromium.org

Releasing allocated chunks in Pool's destructor.

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

Review URL: http://codereview.chromium.org/3048034

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@5142 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 9d6fd082
......@@ -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_++;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment