mirror of
https://github.com/rad4day/Waybar.git
synced 2025-07-14 07:02:30 +02:00
Revert "Revert "Fix potential memory leaks""
This reverts commit 2d33c20231
and
reapplies various patches for memory leaks.
The reason for the revert was a bug for a maximum duration interval
which caused sleep_for() to cause unpredictable behavior.
This commit is contained in:
@ -7,8 +7,7 @@ namespace {
|
||||
class PrepareForSleep {
|
||||
private:
|
||||
PrepareForSleep() {
|
||||
GError *error = NULL;
|
||||
login1_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &error);
|
||||
login1_connection = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, NULL);
|
||||
if (!login1_connection) {
|
||||
spdlog::warn("Unable to connect to the SYSTEM Bus!...");
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user