Revision: 11146
Author: [email protected]
Date: Tue Mar 27 00:37:06 2012
Log: 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
http://code.google.com/p/v8/source/detail?r=11146
Modified:
/branches/bleeding_edge/src/v8.cc
=======================================
--- /branches/bleeding_edge/src/v8.cc Mon Mar 12 06:56:56 2012
+++ /branches/bleeding_edge/src/v8.cc Tue Mar 27 00:37:06 2012
@@ -103,7 +103,9 @@
ASSERT(isolate->IsDefaultIsolate());
if (!has_been_set_up_ || has_been_disposed_) return;
+
isolate->TearDown();
+ delete isolate;
is_running_ = false;
has_been_disposed_ = true;
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev