Skip to content

Commit

Permalink
Destroy objects while the prefs window is closed
Browse files Browse the repository at this point in the history
  • Loading branch information
nlpsuge committed Nov 19, 2023
1 parent 1f4eb74 commit 51213fe
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion prefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {ExtensionPreferences, gettext as _} from 'resource:///org/gnome/Shell/Ex

import * as FileUtils from './utils/fileUtils.js';
import * as Log from './utils/log.js';
import {prefsUtilsInit, PrefsUtils} from './utils/prefsUtils.js';
import {prefsUtilsInit, prefsUtilsDestroy, PrefsUtils} from './utils/prefsUtils.js';
import * as StringUtils from './utils/stringUtils.js';

import * as PrefsCloseWindow from './prefsCloseWindow.js';
Expand All @@ -35,6 +35,9 @@ export default class AnotherWindowSessionManagerPreferences extends ExtensionPre
this._setSensitive();

this._addPages(window);
window.connect('close-request', () => {
this._destroy();
});
}

initUtils(settings) {
Expand Down Expand Up @@ -293,6 +296,11 @@ export default class AnotherWindowSessionManagerPreferences extends ExtensionPre
this._log.error(new Error(`Failed to create folder: ${autostart_restore_desktop_file_path_parent}`));
}
}

_destroy() {
prefsUtilsDestroy();

}
}


Expand Down

0 comments on commit 51213fe

Please sign in to comment.