[gmpi] Re: low level API - Abstract Factory summary

  • From: "Angus F. Hewlett" <angus@xxxxxxxxxxxxx>
  • To: gmpi@xxxxxxxxxxxxx
  • Date: Fri, 11 Feb 2005 09:39:22 +0000

Yes, but - at least in COM - AddRef isn't a direct counterpart of Release and, much of the time as a user of a COM object, you'll never have to call AddRef explicitly.

For example, when you QueryInterface, if the call succeeds the ref-count increment is implied. AFAIR, there are a number of other circumstances where this is also true. On OS X' CoreFoundation, similarly, any "Get" function implies that a ref-counted object is being returned.

Regards,
         Angus.




Tim Hockin wrote:

On Fri, Feb 11, 2005 at 03:28:11PM +1300, Jeff McClintock wrote:


GMPI_RESULT (_stdcall *AddRef) ( IGMPI_Plugin *);
GMPI_RESULT (_stdcall *Release) ( IGMPI_Plugin *);



Oh yeah, we can't rename these, can we? I hate the fact that they are complements, but their names are not.

AddRef, DropRef
Grab, Release
Ref, Unref

Anything that shows that they are a proper pair.  You ought to be able
to guess the name of the one from the other.

Or is that set in the stone of COM?

----------------------------------------------------------------------
Generalized Music Plugin Interface (GMPI) public discussion list
Participation in this list is contingent upon your abiding by the
following rules:  Please stay on topic.  You are responsible for your own
words.  Please respect your fellow subscribers.  Please do not
redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe







--
=========================================================
Angus F. Hewlett, Managing Director (CEO)
FXpansion Audio UK Ltd - http://www.fxpansion.com
Registered in the UK - #4455834 - VAT: GB 798 7782 33
=========================================================



---------------------------------------------------------------------- Generalized Music Plugin Interface (GMPI) public discussion list Participation in this list is contingent upon your abiding by the following rules: Please stay on topic. You are responsible for your own words. Please respect your fellow subscribers. Please do not redistribute anyone else's words without their permission.

Archive: //www.freelists.org/archives/gmpi
Email gmpi-request@xxxxxxxxxxxxx w/ subject "unsubscribe" to unsubscribe

Other related posts: