Valgrind cleanliness, part 1: Delete current isolate on exit.

Currently we leak 140kB from 80 allocation sites when we evaluate a simple
"print(1+2)" in d8 and exit. This might not be a real problem in Chrome because
most of the time the whole process containing v8 vanishes, but it can hide real
leaks in a sea of false positives. Therefore, this CL and a few subsequent ones
clean this up a bit.

This simple CL alone fixes 45 leaks, leaving only 35 with a net loss of 2192
bytes (on ia32).

Review URL: https://chromiumcodereview.appspot.com/9791016

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11146 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent b414adb1
......@@ -103,7 +103,9 @@ void V8::TearDown() {
ASSERT(isolate->IsDefaultIsolate());
if (!has_been_set_up_ || has_been_disposed_) return;
isolate->TearDown();
delete isolate;
is_running_ = false;
has_been_disposed_ = true;
......
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