Re: g_object_unref
- From: Sven Neumann <sven gimp org>
- To: Neil Zanella <nzanella gmail com>
- Cc: GTK List <gtk-list gnome org>
- Subject: Re: g_object_unref
- Date: Mon, 22 Nov 2004 23:27:26 +0100
Hi,
Neil Zanella <nzanella gmail com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]