Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tuneit
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
tuneit
Commits
cba5cfdd
Commit
cba5cfdd
authored
Jan 27, 2026
by
Roman Alifanov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
settings: add timer cleanup to prevent memory leaks
parent
ec0fa632
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
base.py
src/settings/setting/base.py
+11
-1
No files found.
src/settings/setting/base.py
View file @
cba5cfdd
...
...
@@ -41,6 +41,8 @@ class BaseSetting:
self
.
_busy_count
=
0
self
.
_widget_ready
=
False
self
.
_executor
=
get_executor
()
self
.
_timer_id
=
None
self
.
_destroyed
=
False
self
.
search_target
=
setting_data
.
get
(
"search_target"
,
None
)
...
...
@@ -261,10 +263,18 @@ class BaseSetting:
return
def
_poll
():
if
self
.
_destroyed
:
return
False
self
.
_fetch_value_async
(
force
=
True
)
return
True
GLib
.
timeout_add
(
int
(
interval
*
1000
),
_poll
)
self
.
_timer_id
=
GLib
.
timeout_add
(
int
(
interval
*
1000
),
_poll
)
def
destroy
(
self
):
self
.
_destroyed
=
True
if
self
.
_timer_id
is
not
None
:
GLib
.
source_remove
(
self
.
_timer_id
)
self
.
_timer_id
=
None
def
_update_widget
(
self
):
if
self
.
widget
and
self
.
_widget_ready
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment