Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@JoeHut
Copy link
Contributor

@JoeHut JoeHut commented Jul 16, 2019

If the rules are only added to Bluez via DBus but never removed again,
the calls pile up if discover() is called multiple times in one session.
This is especially harmful for long-running applications that connect
and disconnect to the same or different servers over and over. The time
to await discovery() becomes very long (up to minutes) even with smaller
timeouts.

Make sure the callbacks registered are cleaned up before discover() is
left.

Fixes #89

@JoeHut JoeHut force-pushed the fix/bluez/callback_leak branch from e0c7e8b to 50ecd8d Compare July 16, 2019 11:36
If the rules are only added to Bluez via DBus but never removed again,
the calls pile up if discover() is called multiple times in one session.
This is especially harmful for long-running applications that connect
and disconnect to the same or different servers over and over. The time
to await discovery() becomes very long (up to minutes) even with smaller
timeouts.

Make sure the callbacks registered are cleaned up before discover() is
left.
@JoeHut JoeHut force-pushed the fix/bluez/callback_leak branch from 50ecd8d to e4c59f6 Compare July 16, 2019 12:57
@hbldh hbldh self-assigned this Jul 16, 2019
hbldh added a commit that referenced this pull request Jul 16, 2019
Merge branch 'workaroundgmbh-fix/bluez/callback_leak' into develop
@hbldh
Copy link
Owner

hbldh commented Jul 16, 2019

Merged this into develop branch. Will close this when I release 0.5.0.

@hbldh hbldh added this to the v0.5.0 milestone Jul 16, 2019
@hbldh hbldh merged commit e4c59f6 into hbldh:master Aug 2, 2019
hbldh added a commit that referenced this pull request Aug 2, 2019
macOS support added (thanks to @kevincar)
Merged #80: macOS development
Merged #90 which fixed #89: Leaking callbacks in BlueZ
Merged #92 which fixed #91, Prevent leaking of DBus connections on discovery
Merged #96: Regex patterns
Merged #86 which fixed #83 and #82
Recovered old .NET discovery method to try for #95
@arthur-proglove arthur-proglove deleted the fix/bluez/callback_leak branch October 26, 2022 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leaks through missing callback deregistration in Bluez

2 participants