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
---------------------------------------------------------------------- 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