Skip to content

Commit

Permalink
FIX: ClearParserListeners will not unregister handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
JiaChen-Zeng committed Oct 24, 2018
1 parent 5c95685 commit 1b96299
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/NFugue/Parsing/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ public void RemoveParserListener(IParserListener listener)

public void ClearParserListeners()
{
ParserListeners.Clear();
foreach (var listener in ParserListeners)
{
RemoveParserListener(listener);
}
}

public event EventHandler BeforeParsingStarted;
Expand Down

0 comments on commit 1b96299

Please sign in to comment.