Fix memory leak. Make "V8 Linux - memcheck" build bot happy.

Flags::SetFlagsFromCommandLine allocates memory to hold copies of string
arguments when calling Flag::set_string_value(..., true) and presently
noone deallocates this. Resetting the flags will clear this memory.
Since Flags can be used throughout the entire V8 lifetime,
Dispose/Teardown seems like the right location to free this
memory.

This is rarely a problem in practice, but the memcheck buildbot (rightly)
complains.

BUG=
R=machenbach@chromium.org

Review URL: https://codereview.chromium.org/505103003

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23395 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a6e503ad
......@@ -54,6 +54,7 @@ void V8::TearDown() {
Isolate::GlobalTearDown();
Sampler::TearDown();
FlagList::ResetAllFlags(); // Frees memory held by string arguments.
}
......
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