|
The previous code would have leaked all the UpDevice objects because no
free function was set on the returned GPtrArray.
With depending on upower-glib 0.99.8 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.
|