Web lists-archives.com

Re: g_error_free() warning on null pointer




Le duodi 12 fructidor, an CCXXIII, Michael McConville a écrit :
>  1) Sometimes you have to audit other people's code for memory leaks but
>     don't have the time/understanding for logic additions.

Well, in that case, you should be happy: if you have to audit other people's
code and see a GError being freed unconditionally, then you know something
is wrong.

> 
>  2) Even if you are handling the error, the free call is clutter.
>     Keeping it in the function's footer contributes readability.

Freeing resources is clutter, but doing so at the logical place is less
clutter and better for readability. "Everything in the footer" is not the
logical place, it is the brainless place.

Regards,

-- 
  Nicolas George

Attachment: signature.asc
Description: Digital signature

_______________________________________________
gtk-devel-list mailing list
gtk-devel-list@xxxxxxxxx
https://mail.gnome.org/mailman/listinfo/gtk-devel-list