Symbian3/SDK/Source/GUID-A95CDFDE-285F-5DE2-AADE-29B2B9663757.dita
author Dominic Pinkman <dominic.pinkman@nokia.com>
Fri, 11 Jun 2010 12:39:03 +0100
changeset 8 ae94777fff8f
parent 7 51a74ef9ed63
child 13 48780e181b38
permissions -rw-r--r--
Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     1
<?xml version="1.0" encoding="utf-8"?>
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     2
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     3
<!-- This component and the accompanying materials are made available under the terms of the License 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     4
"Eclipse Public License v1.0" which accompanies this distribution, 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     5
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     6
<!-- Initial Contributors:
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     7
    Nokia Corporation - initial contribution.
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     8
Contributors: 
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
     9
-->
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    10
<!DOCTYPE concept
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    11
  PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
ae94777fff8f Week 23 contribution of SDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
Dominic Pinkman <dominic.pinkman@nokia.com>
parents: 7
diff changeset
    12
<concept xml:lang="en" id="GUID-A95CDFDE-285F-5DE2-AADE-29B2B9663757"><title>The object index</title><prolog><metadata><keywords/></metadata></prolog><conbody><p>An object index is used to generate handle-numbers for reference counting objects. </p> <p>An object index is an instance of a <xref href="GUID-70824EE4-9E01-3AC0-9318-4B521A1FDD5E.dita"><apiname>CObjectIx</apiname></xref> class. </p> <p>An object index acts as a collector of reference counting objects but, unlike an object container, it does not act as a container for them. The difference is emphasised by the fact that removing a reference counting object from its object container causes that reference counting object to be <i>destroyed</i>, while removing it from an object index causes it to be <i>closed</i>. </p> <p>An object index can hold reference counting objects which belong to different object containers. The same reference counting object can also be added to an object index any number of times; each is regarded as a different instance of that object and each instance generates a different handle-number. </p> <p> <xref href="GUID-70824EE4-9E01-3AC0-9318-4B521A1FDD5E.dita#GUID-70824EE4-9E01-3AC0-9318-4B521A1FDD5E/GUID-03EC7FEC-030F-3F4E-9FF1-669284626DF5"><apiname>CObjectIx::AddL()</apiname></xref> adds a reference counting object to an object index, and is the way in which a unique handle-number can be generated for that object. A handle-number is the way in which an object which is owned or managed by another thread or process can be identified. For example, on the server side, the object representing a thread (a <codeph>DThread</codeph>) maintains an object index for all objects which are open in that thread. Semaphores, mutexes and other threads are examples. Typically, user code running in that thread will have handles, <codeph>RHandleBase</codeph> derived types, open on those objects. </p> <p>The following drawing shows the idea. </p> <fig id="GUID-139E5A87-1E6E-5102-AE60-A707EFC5AD5D"><image href="GUID-6BA9989F-6D45-5D77-BC79-DE4B5DD35A6C_d0e244875_href.png" placement="inline"/></fig> <p>An object index is implemented as an array where each element of the array contains a pointer to the reference counting object. An object index can index up to 32,768 (0x8000) reference counting objects. </p> <p>See also: </p> <ul><li id="GUID-3BD162E5-C0A7-5D42-94E3-6E2A0468749A"><p> <xref href="GUID-70824EE4-9E01-3AC0-9318-4B521A1FDD5E.dita"><apiname>CObjectIx</apiname></xref> </p> </li> <li id="GUID-C7108AB5-3F32-5F1D-B15F-E6DBE5CF9809"><p> <xref href="GUID-72761B3C-ECB6-34B2-87ED-C972E479357A.dita"><apiname>CObjectConIx</apiname></xref> </p> </li> <li id="GUID-00290334-9DA4-5FC0-874A-CD839027FD28"><p> <xref href="GUID-DE901A59-C714-356A-9490-C4E9C9F186DB.dita"><apiname>CObjectCon</apiname></xref> </p> </li> <li id="GUID-25EBCB93-A34E-57C3-BD33-B20398FD3CC0"><p> <xref href="GUID-9230EF62-376A-389C-B720-7C1EDCB7EA97.dita"><apiname>CObject</apiname></xref> </p> </li> </ul> </conbody></concept>