Re: Proposal: Ref Counting Conventions
- From: Miguel de Icaza <miguel helixcode com>
- To: shunter bigsky net
- Cc: gnome-components-list gnome org
- Subject: Re: Proposal: Ref Counting Conventions
- Date: 16 May 2000 19:27:18 -0400
> FWIW, according "Inside Com" by Dale Rogerson, the rule is to
> unref the inout out parameter before changing it. (Chapter 4,
> referred to as "The In-Out Paramter Rule", page 82 in my copy).
>
> I'll quote...
>
> A function must call Release on an interface pointer passes via an
> in-out parameter before overwriting the in parameter with another
> interface pointer. The function must also call AddRef on the out
> paramter before returning to the caller.
>
> I leave to greater minds to decide if that is wise or not :) I'm just
> trying to get up to speed on bonobo.
I agree on the AddRef part, I dont on the other one. But my Microsoft
documentation has no reference to this in-out convention.
Miguel
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]