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
This commit is contained in:
parent
9d6fd08276
commit
10b847eb55
@ -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_++;
|
||||
|
Loading…
Reference in New Issue
Block a user