[Geany-devel] Geany memory behavior "suspected memory leak - ID: 3415254" - g_slice

Colomban Wendling lists.ban at xxxxx
Fri Oct 14 18:33:28 UTC 2011

Le 14/10/2011 16:24, Nick Treleaven a écrit :
> [...]
> I don't know if converting our other uses of g_new for fixed size
> structures is worth it, but I would say it is good practice to use
> g_slice in all new code.

I think if we allocate a struct a significant amount of times it could
be a good thing, yep.  However if it's a rare allocation I doubt
(according to GLib's docs) using GSlice really make much sense, so maybe
it isn't worth converting all uses.  But I agree we should probably use
GSlice where we g_new() a structure more than once.


More information about the Devel mailing list