mozilla

Compare Revisions

Getting Started Guide

Change Revisions

Revision 42858:

Revision 42858 by kmaglione on

Revision 287566:

Revision 287566 by mikeaich on

Title:
Getting Started Guide
Getting Started Guide
Slug:
Using_nsCOMPtr/Getting_Started_Guide
Using_nsCOMPtr/Getting_Started_Guide
Tags:
XPCOM
XPCOM
Content:

Revision 42858
Revision 287566
n10    <h3 name="Introduction">n10    <h3 id="Introduction" name="Introduction">
n13    <h4 name="What_is_nsCOMPtr.3F">n13    <h4 id="What_is_nsCOMPtr.3F" name="What_is_nsCOMPtr.3F">
n34    <h4 name=".5BXP.5DCOM_Basics:_Ownership_and_Reference_Countinn34    <h4 id=".5BXP.5DCOM_Basics:_Ownership_and_Reference_Counting"
>g">> name=".5BXP.5DCOM_Basics:_Ownership_and_Reference_Counting">
n75    <h4 name="How_does_nsCOMPtr_help.3F">n75    <h4 id="How_does_nsCOMPtr_help.3F" name="How_does_nsCOMPtr_he
 >lp.3F">
n148    <h3 name="Using_nsCOMPtr">n148    <h3 id="Using_nsCOMPtr" name="Using_nsCOMPtr">
n151    <h4 name="The_Basics">n151    <h4 id="The_Basics" name="The_Basics">
n284    <h4 name="A_Few_Details">n284    <h4 id="A_Few_Details" name="A_Few_Details">
n403    <h4 name="Something_nsCOMPtr_Doesn.27t_Do">n403    <h4 id="Something_nsCOMPtr_Doesn.27t_Do" name="Something_nsCO
 >MPtr_Doesn.27t_Do">
n417nsCacheRecord::GetFileSpec( nsIFileSpec** aFileSpecResult )n417nsCacheRecord::GetFileSpec( nsIFileSpec** aFileSpec )
n472    <h4 name="Where_should_I_use_nsCOMPtrs.3F">n472    <h4 id="Where_should_I_use_nsCOMPtrs.3F" name="Where_should_I
 >_use_nsCOMPtrs.3F">
n478    <h4 name="Where_shouldn.27t_I_use_nsCOMPtrs.3F">n478    <h4 id="Where_shouldn.27t_I_use_nsCOMPtrs.3F" name="Where_sho
 >uldn.27t_I_use_nsCOMPtrs.3F">
n484    <h4 name="nsCOMPtrs_for_non-interface_classes">n484    <h4 id="nsCOMPtrs_for_non-interface_classes" name="nsCOMPtrs_
 >for_non-interface_classes">
n490    <h4 name="nsCOMPtrs_in_function_signatures">n490    <h4 id="nsCOMPtrs_in_function_signatures" name="nsCOMPtrs_in_
 >function_signatures">
n496    <h5 name="nsCOMPtr.3CT.3E_f.28.29_don.27t_return_an_nsCOMPtr"n496    <h5 id="nsCOMPtr.3CT.3E_f.28.29_don.27t_return_an_nsCOMPtr" n
>>>ame="nsCOMPtr.3CT.3E_f.28.29_don.27t_return_an_nsCOMPtr">
n564    <h5 name="void_f.28_nsCOMPtr.3CT.3E_.29_don.27t_pass_an_nsCOMn564    <h5 id="void_f.28_nsCOMPtr.3CT.3E_.29_don.27t_pass_an_nsCOMPt
>Ptr_by_value">>r_by_value" name="void_f.28_nsCOMPtr.3CT.3E_.29_don.27t_pass_an_n
 >sCOMPtr_by_value">
n570    <h5 name="void_f.28_const_nsCOMPtr.3CT.3E&amp;_.29_don.27t_pan570    <h5 id="void_f.28_const_nsCOMPtr.3CT.3E&amp;_.29_don.27t_pass
>ss_an_nsCOMPtr_by_const_reference">>_an_nsCOMPtr_by_const_reference" name="void_f.28_const_nsCOMPtr.3
 >CT.3E&amp;_.29_don.27t_pass_an_nsCOMPtr_by_const_reference">
n576    <h5 name="void_f.28_nsCOMPtr.3CT.3E.2A_.29_avoid_passing_an_nn576    <h5 id="void_f.28_nsCOMPtr.3CT.3E.2A_.29_avoid_passing_an_nsC
>sCOMPtr_by_address.2C_if_possible">>OMPtr_by_address.2C_if_possible" name="void_f.28_nsCOMPtr.3CT.3E.
 >2A_.29_avoid_passing_an_nsCOMPtr_by_address.2C_if_possible">
n580      This practice requires callers to have an <code>nsCOMPtr</cn580      This practice requires callers to have an <code>nsCOMPtr</c
>ode>, and requires them to do a little extra work, as <code>opera>ode>, and requires them to do a little extra work, as <code>opera
>tor&amp;</code> for <code>nsCOMPtr</code>s is <code>private</code>tor&amp;</code> for <code>nsCOMPtr</code>s is <code>private</code
>> (to help prevent <a href="/en/Using_nsCOMPtr/Reference_Manual#C>> (to help prevent <a href="/en/Using_nsCOMPtr/Reference_Manual#C
>asting" title="en/Using_nsCOMPtr/Reference_Manual#Casting">leaks >asting" title="en/Using_nsCOMPtr/Reference_Manual#Casting">leaks 
>caused by casting</a>; also see {{ Bug("59414") }}). This is an a>caused by casting</a>; also see {{ Bug(59414) }}). This is an acc
>cceptable way to declare `in/out' parameters, but prefer passing >eptable way to declare `in/out' parameters, but prefer passing <c
><code>nsCOMPtr</code>s by reference, as below.>ode>nsCOMPtr</code>s by reference, as below.
n599    <h5 name="void_f.28_nsCOMPtr.3CT.3E&amp;_.29_do_pass_an_nsCOMn599    <h5 id="void_f.28_nsCOMPtr.3CT.3E&amp;_.29_do_pass_an_nsCOMPt
>Ptr_by_reference_for_.60in.2Fout.27_parameters">>r_by_reference_for_.60in.2Fout.27_parameters" name="void_f.28_nsC
 >OMPtr.3CT.3E&amp;_.29_do_pass_an_nsCOMPtr_by_reference_for_.60in.
 >2Fout.27_parameters">
t605    <h3 name="Summary">t605    <h3 id="Summary" name="Summary">

Back to History