author | Dominic Pinkman <Dominic.Pinkman@Nokia.com> |
Wed, 31 Mar 2010 11:11:55 +0100 | |
changeset 7 | 51a74ef9ed63 |
child 8 | ae94777fff8f |
permissions | -rw-r--r-- |
7
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
1 |
<?xml version="1.0" encoding="utf-8"?> |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
2 |
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. --> |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
3 |
<!-- This component and the accompanying materials are made available under the terms of the License |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
4 |
"Eclipse Public License v1.0" which accompanies this distribution, |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
5 |
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". --> |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
6 |
<!-- Initial Contributors: |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
7 |
Nokia Corporation - initial contribution. |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
8 |
Contributors: |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
9 |
--> |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
10 |
<!DOCTYPE concept |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
11 |
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd"> |
51a74ef9ed63
Week 12 contribution of API Specs and fix SDK submission
Dominic Pinkman <Dominic.Pinkman@Nokia.com>
parents:
diff
changeset
|
12 |
<concept xml:lang="en" id="GUID-48C764A2-378F-57CC-B7F2-EC866AE8F830"><title>The reference counting object</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>A reference counting object is one which uses reference counting to track concurrent references to itself and which arranges for automatic destruction of itself when the final reference is removed. It is also an object which can be named. </p> <p>A reference counting object is any object which has <codeph>CObject</codeph> as its base class. </p> <p>Constructing a <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject</apiname></xref> derived type, or calling its <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita#GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97/GUID-E6319811-605D-3329-9314-ED25F4A9116C"><apiname>CObject::Open()</apiname></xref> member function, adds a reference to that object by adding one to its reference count. Calling its <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita#GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97/GUID-6E50F446-307B-3C9D-9AD6-AFCB49B2F658"><apiname>CObject::Close()</apiname></xref> member function removes a reference by subtracting one from its reference count. When the last user of the object calls <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita#GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97/GUID-6E50F446-307B-3C9D-9AD6-AFCB49B2F658"><apiname>CObject::Close()</apiname></xref>, the reference count becomes zero and the object is automatically destroyed. </p> <p>The following drawing shows the idea. </p> <fig id="GUID-18A04428-FBD7-5115-B206-6F2E67343A7F"><image href="GUID-39AAB0D3-6D4D-5DE3-B894-F5E763D3E19B_d0e248344_href.png" placement="inline"/></fig> <p>A <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject</apiname></xref> is always part of a class hierarchy. It is a base class; an explicit <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject</apiname></xref> type is never instantiated. </p> <p>The server side implementation of a client/server subsession uses a <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject</apiname></xref>. </p> <p>See also: </p> <ul><li id="GUID-20A9F23B-19B5-5D70-9943-811FC42F3BED"><p> <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject</apiname></xref> </p> </li> <li id="GUID-8C980E14-F073-5918-AD66-8547656BC13D"><p> <xref href="GUID-1CC6FEF0-7D1E-5329-8276-22ACFE3DE362.dita">Subsessions within a session</xref> </p> </li> <li id="GUID-C5FCE438-1F8B-569C-9257-0EBE9D823747"><p> <xref href="GUID-6047DB3F-DC92-51DF-9EEB-00E79E890B54.dita">Using client/server</xref> </p> </li> </ul> </conbody></concept> |