Re: g_try_new and g_try_new0 + error reporting for g_object_set
- From: Sven Neumann <sven gimp org>
- To: Matthias Clasen <mclasen redhat com>
- Cc: gtk-devel-list gnome org
- Subject: Re: g_try_new and g_try_new0 + error reporting for g_object_set
- Date: Wed, 09 Mar 2005 00:41:38 +0100
Matthias Clasen <mclasen redhat com> writes:
>> > is there a reason why we dont have g_try_new and g_try_new0.
> g_new and g_new0 are just convenience macros, and glib generally doesn't
> try to handle oom situations. It should be easy enough to write your own
> try_new() macro if you need it.
It would however not hurt to have glib provide these simple macros so
that people wouldn't have to write their own ones. IMO it would make
sense to add them.
] [Thread Prev