Re: g_object_unref

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

 



Hi,

Neil Zanella <nzanella@xxxxxxxxx> writes:

> Is it OK to call g_object_unref() on a NULL pointer (with nothing
> happening)?

Use the source, Luke.

A quick view at the source code clearly shows that, no, it is not OK.

> (and I think this should be mentioned in the docs)

The docs explicitely mention whenever it is OK to pass NULL. If they
don't, it is very likely that it is not OK and even if it works, it
isn't safe to assume that it will work in the future. Only if NULL is
explicitely documented as being allowed, you can rely on it.


Sven
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux