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/lib3/yaml/parser.py

    r328 r377  
    8787        self.state = self.parse_stream_start 
    8888 
     89    def dispose(self): 
     90        # Reset the state attributes (to clear self-references) 
     91        self.states = [] 
     92        self.state = None 
     93 
    8994    def check_event(self, *choices): 
    9095        # Check the type of the next event. 
Note: See TracChangeset for help on using the changeset viewer.