Re: Sinkability considered harmful



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]