summaryrefslogtreecommitdiff
path: root/lib3/yaml/parser.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib3/yaml/parser.py')
-rw-r--r--lib3/yaml/parser.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib3/yaml/parser.py b/lib3/yaml/parser.py
index c147dd6..13a5995 100644
--- a/lib3/yaml/parser.py
+++ b/lib3/yaml/parser.py
@@ -86,6 +86,11 @@ class Parser:
self.marks = []
self.state = self.parse_stream_start
+ def dispose(self):
+ # Reset the state attributes (to clear self-references)
+ self.states = []
+ self.state = None
+
def check_event(self, *choices):
# Check the type of the next event.
if self.current_event is None: