Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2006

    RArray vs. RPointerArray

    In the Symbian OS header file implementationinformation.h we find:

    typedef RArray<CImplementationInformation*> RImplInfoArray;

    typedef RPointerArray<CImplementationInformation> RImplInfoPtrArray;

    Aren't these two basically the same? I have been wondering whether
    there is any difference between an

    RArray<Foo *> and an RPointerArray<Foo>.

    Conceptually, these two seem the same. What about
    the implementation. Are there differences?



  2. #2
    Super Contributor
    Join Date
    Mar 2004

    Re: RArray vs. RPointerArray

    The basic difference b/w a RArray and a RPointerArray is that in the former, the instances are owned by the Array while in the latter the array has pointers to the actual instances.

    RArray(owns) -> The instance
    RPointerArray(pointer)-> points to the instances.

    So where u want to own the instances per se use RArray while where u just want to use the instances and not be bothered about the ownership use RPointerArray.


Similar Threads

  1. How to declare a RArray of TBufC?
    By stevenhotw in forum Symbian
    Replies: 4
    Last Post: 2006-11-03, 06:38
  2. Problem with RArray
    By Matute_CR in forum Symbian
    Replies: 5
    Last Post: 2006-07-06, 17:52
  3. RPointerArray value assignment
    By zhengyu97 in forum Symbian
    Replies: 2
    Last Post: 2005-04-06, 12:35
  4. Rarray granular problem
    By lauyk001 in forum Symbian
    Replies: 1
    Last Post: 2005-01-14, 23:08
  5. RPointerArray Insertion and Access
    By Vextorin in forum Symbian
    Replies: 2
    Last Post: 2004-07-07, 20:26

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts