Ignore:
Timestamp:
05/29/11 22:51:30 (3 years ago)
Author:
xi
Message:

Clear cyclic references in the parser and the emitter to avoid extra GC calls.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pyyaml/trunk/lib/yaml/emitter.py

    r351 r377  
    103103        self.analysis = None 
    104104        self.style = None 
     105 
     106    def dispose(self): 
     107        # Reset the state attributes (to clear self-references) 
     108        self.states = [] 
     109        self.state = None 
    105110 
    106111    def emit(self, event): 
Note: See TracChangeset for help on using the changeset viewer.