The previous code would have leaked all the UpDevice objects because no free function was set on the returned GPtrArray. Since we already depend on upower-glib 0.99.8 which is the release in which get_devices() was deprecated and get_devices2() was introduced, we can simply switch to get_devices2() which does set a free function on the returned GPtrArray, stopping the leak. |
||
---|---|---|
.. | ||
icons | ||
cc-power-panel.c | ||
cc-power-panel.h | ||
cc-power-panel.ui | ||
gnome-power-panel.desktop.in.in | ||
meson.build | ||
power.gresource.xml |