/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/load.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/load.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1844 by bh, Tue Oct 21 10:49:44 2003 UTC revision 1930 by bh, Tue Nov 11 13:24:41 2003 UTC
# Line 149  class SessionLoader(XMLReader): Line 149  class SessionLoader(XMLReader):
149    
150          XMLReader.AddDispatchers(self, dispatchers)          XMLReader.AddDispatchers(self, dispatchers)
151    
152        def Destroy(self):
153            """Clear all instance variables to cut cyclic references.
154    
155            The GC would have collected the loader eventually but it can
156            happen that it doesn't run at all until Thuban is closed (2.3
157            but not 2.2 tries a bit harder and forces a collection when the
158            interpreter terminates)
159            """
160            self.__dict__.clear()
161    
162      def start_session(self, name, qname, attrs):      def start_session(self, name, qname, attrs):
163          self.theSession = Session(self.encode(attrs.get((None, 'title'),          self.theSession = Session(self.encode(attrs.get((None, 'title'),
164                                                          None)))                                                          None)))
# Line 559  def load_session(filename, db_connection Line 569  def load_session(filename, db_connection
569      # Newly loaded session aren't modified      # Newly loaded session aren't modified
570      session.UnsetModified()      session.UnsetModified()
571    
572        handler.Destroy()
573    
574      return session      return session
575    

Legend:
Removed from v.1844  
changed lines
  Added in v.1930

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26