Reviewers: William Hesse,

Description:
Fix memory leak from sample/shell.cc.

We did not dispose the semaphores used in SourceGroup

Please review this at http://codereview.chromium.org/7366002/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     samples/shell.cc


Index: samples/shell.cc
===================================================================
--- samples/shell.cc    (revision 8635)
+++ samples/shell.cc    (working copy)
@@ -95,6 +95,11 @@
                   begin_offset_(0),
                   end_offset_(0) { }

+  ~SourceGroup() {
+    delete next_semaphore_;
+    delete done_semaphore_;
+  }
+
   void Begin(char** argv, int offset) {
     argv_ = const_cast<const char**>(argv);
     begin_offset_ = offset;


--
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev

Reply via email to