Re: array of pfDCS (CORRECTION)

New Message Reply Date view Thread view Subject view Author view

Scott McMillan (scott++at++ht.com)
Thu, 3 Jul 1997 10:32:51 -0400 (EDT)


Oops...a typo:

> The man page states: "...like other pfNodes, pfDCSes are always allocated
> from shared memory and cannot be created statically, on the stack or in
> arrays." I am positive you are running into this in the first case and
> assume so in the second case too. The following code dynamically allocates
> an array of pfDCS pointers (optionally from the shared arena), and then it
> loops through and dynamically allocates each pfDCS (calling the constructor
> to boot):
>
> pfDCS **dcsArray;
> dcsArray = new(pfGetSharedShared()) pfDCS *[4];
                               ^^^^^^
                    pfGetSharedArena()

> for (int i=0; i<4; i++)
> dcsArray[i] = new pfDCS();
>

-- 
  Scott McMillan  |    HT Medical, Inc.   | Developing medical VE's
   scott++at++ht.com   |   http://www.ht.com   | surgical simulations
 Ph: 301-984-3706 |6001 Montrose Rd., #902| and surgery simulation
Fax: 301-984-2104 |  Rockville, MD 20852  | creation tools.

======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:34 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.