Author: [email protected]
Date: Sun Jun 14 23:27:33 2009
New Revision: 2158

Modified:
    branches/bleeding_edge/src/regexp-macro-assembler-irregexp.cc

Log:
Fix memory leak in regexp macro assembler.  If the buffer has been
expanded the macro assembler owns the buffer and needs to dispose it
in the destructor.
Review URL: http://codereview.chromium.org/126111

Modified: branches/bleeding_edge/src/regexp-macro-assembler-irregexp.cc
==============================================================================
--- branches/bleeding_edge/src/regexp-macro-assembler-irregexp.cc       
(original)
+++ branches/bleeding_edge/src/regexp-macro-assembler-irregexp.cc       Sun Jun 
 
14 23:27:33 2009
@@ -47,6 +47,7 @@

  RegExpMacroAssemblerIrregexp::~RegExpMacroAssemblerIrregexp() {
    if (backtrack_.is_linked()) backtrack_.Unuse();
+  if (own_buffer_) buffer_.Dispose();
  }



--~--~---------~--~----~------------~-------~--~----~
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
-~----------~----~----~----~------~----~------~--~---

Reply via email to