Re: bonobo_object_ref
- From: Ettore Perazzoli <ettore helixcode com>
- To: Mathieu Lacage <mathieu eazel com>
- Cc: Michael Meeks <mmeeks gnu org>, gnome-components-list gnome org
- Subject: Re: bonobo_object_ref
- Date: 04 Aug 2000 20:12:39 -0100
> 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]