modules/upower: use smart pointer to avoid memory leak

This commit is contained in:
Tamino Bauknecht
2023-10-20 22:36:44 +02:00
parent 8c57756556
commit a73669be6a
2 changed files with 3 additions and 3 deletions

View File

@ -2,6 +2,7 @@
#include <libupower-glib/upower.h>
#include <memory>
#include <unordered_map>
#include "gtkmm/box.h"
@ -16,7 +17,7 @@ class UPowerTooltip : public Gtk::Window {
const std::string getDeviceIcon(UpDeviceKind& kind);
Gtk::Box* contentBox;
std::unique_ptr<Gtk::Box> contentBox;
uint iconSize;
uint tooltipSpacing;