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))) |
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 |
|
|