From: hanwen Date: Wed, 26 May 2004 12:03:14 +0000 (+0000) Subject: (My_lily_parser): don't delete lexer. X-Git-Tag: release/2.3.9^2~204 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=526ff1eef90c1a0858b85827b4a61b39a1876ac7;p=lilypond.git (My_lily_parser): don't delete lexer. --- diff --git a/ChangeLog b/ChangeLog index 7637f7a92f..1abfdfc38a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-05-26 Han-Wen Nienhuys + + * lily/my-lily-parser.cc (My_lily_parser): don't delete lexer. + 2004-05-25 Han-Wen Nienhuys * lily/score.cc (default_rendering): scale outputdef before diff --git a/lily/my-lily-parser.cc b/lily/my-lily-parser.cc index 4c7df0a4c5..018d4b0e8a 100644 --- a/lily/my-lily-parser.cc +++ b/lily/my-lily-parser.cc @@ -45,7 +45,7 @@ My_lily_parser::My_lily_parser (My_lily_parser const &src) { book_count_ = src.book_count_; score_count_ = src.score_count_; - lexer_ = src.lexer_; + lexer_ = 0; sources_ = src.sources_; default_duration_ = src.default_duration_; error_level_ = src.error_level_; @@ -53,11 +53,12 @@ My_lily_parser::My_lily_parser (My_lily_parser const &src) header_ = src.header_; smobify_self (); + lexer_ = new My_lily_lexer (*src.lexer_); } My_lily_parser::~My_lily_parser () { - delete lexer_; + // FIXME: Memleak: del lexer } IMPLEMENT_SMOBS (My_lily_parser); @@ -108,6 +109,8 @@ My_lily_parser::parse_file (String init, String name, String out_name) } error_level_ = error_level_ | lexer_->error_level_; + delete lexer_; + lexer_ = 0; } void