Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor memory leaks and remove blocking dbus calls #211

Merged
merged 7 commits into from Sep 2, 2014
Merged

Fix minor memory leaks and remove blocking dbus calls #211

merged 7 commits into from Sep 2, 2014

Conversation

spiiroin
Copy link
Contributor

@spiiroin spiiroin commented Sep 1, 2014

Add missing / fix incorrect dynamic resource releasing at mce exit path. Does not change behavior during runtime, but should reduce noise in future memory leak hunts.

Also removes potentially blocking D-Bus connection flushing and replaces blocking D-Bus name owner
queries with asynchronous logic.

[mce] Fix minor memory leaks and remove blocking dbus calls. Fixes JB#22450

While closing logging is not necessary, doing it reduces noise during
memory leak debugging. In the code the logging cleanup was made on
abnormal exit paths, but omitted when making an orderly exit.

Remove unnecessary mce_log_close() calls from abnormal exit paths.

Perform logging cleanup actions on normal exit.
While file monitoring signal was disconnected and monitoring cancelled,
the related gobjects were not cleaned up.

Omit unnecessary g_file_monitor_cancel() calls and make appropriate
g_object_unref() calls.

Also change initially available device scanning to happen after the
directory monitoring is in place.
All datapipes initialized with setup_datepipe() should also be
cleaned up via free_datapipe().

Add missing free_datapipe() call for camera button datapipe.
Static symbols etc were missing from mce debuginfo packages because
extra debug information was not generated during compilation.

Use '-g' option both for compilation and linking.
The standard dbus_bus_name_has_owner() function from libdbus uses
blocking D-Bus method call.

Use custom asynchronous query instead.
The dbus_connection_flush() can block and is not needed since
the connection is bound to the glib mainloop.

Remove potentially blocking The dbus_connection_flush() calls.
Leaving callback functions from unloaded modules active can cause
mce crashes on exit path.

Remove all installed gconf notifiers when modules are unloaded
at mce exit time.
spiiroin added a commit that referenced this pull request Sep 2, 2014
Fix minor memory leaks and remove blocking dbus calls
@spiiroin spiiroin merged commit 450b575 into nemomobile:master Sep 2, 2014
@spiiroin spiiroin deleted the memleaks branch September 2, 2014 05:23
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.

None yet

1 participant