Re: g_try_new and g_try_new0 + error reporting for g_object_set



Hi,

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.


Sven



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]