Re: Sinkability considered harmful
- From: Owen Taylor <otaylor redhat com>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: Federico Mena Quintero <federico ximian com>, GTK+ development mailing list <gtk-devel-list gnome org>, Tim Janik <timj imendio com>
- Subject: Re: Sinkability considered harmful
- Date: Wed, 04 Jan 2006 10:26:44 -0500
On Wed, 2006-01-04 at 10:50 -0500, Tristan Van Berkom wrote:
> Tim Janik wrote:
> [...]
> > MyObject *object; /* move to declaration section */
> >
> > object = create_a_floating_object();
> > some_container_add (container, object);
> > my_object_unref (object);
>
> In a sane world where your program doesnt explode
> due to OOM conditions, it would read like this anyway:
>
> if ((object = create_a_floating_object()) != NULL) {
> some_container_add (container, object);
> my_object_unref (object);
> }
[ taking the troll-bait and digressing :-) ]
And so, what you do in the other branch of this if statement?
Regards,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]