mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Library: don't leak DB model objects at exit
Currently these objects are created once at program startup and are never destroyed. Printing debug messages in the models' destructors confirms the leaks and proves that with this fix the objects are destroyed at Library exit.
This commit is contained in:
parent
5fd5ff5b64
commit
c4333915c9
@ -413,15 +413,15 @@ void LibraryWindow::setUpShortcutsManagement()
|
||||
void LibraryWindow::doModels()
|
||||
{
|
||||
//folders
|
||||
foldersModel = new FolderModel();
|
||||
foldersModelProxy = new FolderModelProxy();
|
||||
foldersModel = new FolderModel(this);
|
||||
foldersModelProxy = new FolderModelProxy(this);
|
||||
folderQueryResultProcessor.reset(new FolderQueryResultProcessor(foldersModel));
|
||||
//foldersModelProxy->setSourceModel(foldersModel);
|
||||
//comics
|
||||
comicsModel = new ComicModel(this);
|
||||
//lists
|
||||
listsModel = new ReadingListModel();
|
||||
listsModelProxy = new ReadingListModelProxy();
|
||||
listsModel = new ReadingListModel(this);
|
||||
listsModelProxy = new ReadingListModelProxy(this);
|
||||
|
||||
//setSearchFilter(YACReader::NoModifiers, ""); //clear search filter
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user