Re: [PATCH 1/6] virsysinfo: Define and use auto cleanup func for virSysinfoDef properly

2021-03-12 Thread Ján Tomko
On a Thursday in 2021, Michal Privoznik wrote: What we are using really is heap allocated structure rather than stack allocated. And for that it's better to use g_autoptr() + G_DEFINE_AUTOPTR_CLEANUP_FUNC() combo, as Glib documentation for g_auto() reads: This is meant to be used with

[PATCH 1/6] virsysinfo: Define and use auto cleanup func for virSysinfoDef properly

2021-03-11 Thread Michal Privoznik
What we are using really is heap allocated structure rather than stack allocated. And for that it's better to use g_autoptr() + G_DEFINE_AUTOPTR_CLEANUP_FUNC() combo, as Glib documentation for g_auto() reads: This is meant to be used with stack-allocated structures and non-pointer types. For