Re: bonobo_object_ref



> I really hate code which does this:
> 
> do_something (bonobo_object_ref (obj));

This is bad indeed, but it does not happen often.

What happens all the time is that you want to save the value of the
pointer somewhere, and at the same time add a reference to it (as you
correctly need to do). So the case we are attacking here is:

	var = obj;
	bonobo_object_ref (obj);

which becomes

	var = bonobo_object_ref (obj);

The latter is definitely clearer.

-- 
Ettore





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