mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Merge pull request #2004 from bwaite/fix-memory-leak-upower
This commit is contained in:
commit
d25930793c
@ -85,6 +85,12 @@ int main(int argc, char* argv[]) {
|
||||
waybar::Client::inst()->reset();
|
||||
});
|
||||
|
||||
std::signal(SIGINT, [](int /*signal*/) {
|
||||
spdlog::info("Quitting.");
|
||||
reload = false;
|
||||
waybar::Client::inst()->reset();
|
||||
});
|
||||
|
||||
for (int sig = SIGRTMIN + 1; sig <= SIGRTMAX; ++sig) {
|
||||
std::signal(sig, [](int sig) {
|
||||
for (auto& bar : waybar::Client::inst()->bars) {
|
||||
|
@ -29,7 +29,7 @@ UPowerTooltip::~UPowerTooltip() {}
|
||||
uint UPowerTooltip::updateTooltip(Devices& devices) {
|
||||
// Removes all old devices
|
||||
for (auto child : contentBox->get_children()) {
|
||||
child->~Widget();
|
||||
delete child;
|
||||
}
|
||||
|
||||
uint deviceCount = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user