11 May
2009
11 May
'09
10:14 p.m.
According to the glib manual for g_try_new: http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-t...
"Attempts to allocate n_structs elements of type struct_type, and returns NULL on failure. Contrast with g_new(), which aborts the program on failure. The returned pointer is cast to a pointer to the given type. If n_structs is 0 it returns NULL. ... Since 2.8"
Can we assume that everyone uses glib 2.8? I already commited patch svn rev 21327 that uses g_try_new ...
Adib. ---