gplugin/gplugin

Fix a leak in settings list

14 months ago, Elliott Sales de Andrade
2695cbb5e004
Fix a leak in settings list

Fixes a leak for plugins that have settings:
```
48 (32 direct, 16 indirect) bytes in 1 blocks are definitely lost in loss record 12,560 of 29,780
at 0x4A231EF: g_type_create_instance (gtype.c:1909)
by 0x4A08C1F: g_object_new_internal (gobject.c:2228)
by 0x4A0A247: g_object_new_with_properties (gobject.c:2391)
by 0x4A0AFF0: g_object_new (gobject.c:2037)
by 0x4C64DA7: gtk_size_group_new (gtksizegroup.c:300)
by 0x487356A: gplugin_gtk_plugin_settings_list_refresh (gplugin-gtk-plugin-settings-list.c:492)
by 0x4873CBA: gplugin_gtk_plugin_settings_list_set_settings (gplugin-gtk-plugin-settings-list.c:662)
by 0x4870DEE: gplugin_gtk_plugin_page_update_settings_list (gplugin-gtk-plugin-page.c:98)
by 0x48717DD: gplugin_gtk_plugin_page_set_plugin (gplugin-gtk-plugin-page.c:394)
by 0x48750EF: gplugin_gtk_view_show_plugin (gplugin-gtk-view.c:567)
by 0x4873FD0: gplugin_gtk_view_row_activated (gplugin-gtk-view.c:82)
by 0x49F8A64: g_cclosure_marshal_VOID__OBJECTv (gmarshal.c:1910)
```

Testing Done:
Opened viewer in valgrind, went to settings plugin's info, and leak was no longer there.

Reviewed at https://reviews.imfreedom.org/r/2305/
# Dependencies
GPlugin depends on the following at a bare minimum:
* glib-2.0 >= 2.40.0
* gobject-introspection, libgirepository1.0-dev
* meson >= 0.42.0
* gettext
* help2man
* a C compiler
A full build (enabled by default) depends on the following:
* gtk-4
* python3-dev, python-gi-dev, python3-gi
* libperl-dev, libglib-perl, libglib-object-introspection-perl
* liblua5.1-0-dev, lua-lgi
* valac
All of these packages and their development headers need to be installed
prior to building GPlugin.
# Building
GPlugin uses [meson](https://mesonbuild.com/) as its build system. As such
compiling is a little bit different than your typical `./configure`, `make`,
`sudo make install`.
Meson requires you to build in a separate directory than your source. As such,
these instructions use a separate build directory.
To compile you need to run the following commands:
```
meson build
cd build
ninja install
```
If you want/need to tweak the build system (to enable/disable certain loaders)
you can do so at any time by using `meson configure` in the build directory.