Index: pyyaml/trunk/lib/yaml/emitter.py
===================================================================
--- pyyaml/trunk/lib/yaml/emitter.py	(revision 351)
+++ pyyaml/trunk/lib/yaml/emitter.py	(revision 377)
@@ -103,4 +103,9 @@
         self.analysis = None
         self.style = None
+
+    def dispose(self):
+        # Reset the state attributes (to clear self-references)
+        self.states = []
+        self.state = None
 
     def emit(self, event):
