Explicitly run a garbage collection after switching a library to ensure that it does not freeze the interface at a later time

This commit is contained in:
Kovid Goyal 2011-03-15 13:30:52 -06:00
parent 9ed480327f
commit 4511e1e178

View File

@ -463,6 +463,10 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
self.card_a_view.reset()
self.card_b_view.reset()
self.device_manager.set_current_library_uuid(db.library_id)
# Run a garbage collection now so that it does not freeze the
# interface later
import gc
gc.collect()
def set_window_title(self):