Scott McMillan (scott++at++ht.com)
Fri, 11 Jul 1997 12:28:56 -0400 (EDT)
My bad, I thought I understood the overloaded new in pfObject (my C++ is
apparently not even that good). Try this (I know it will
compile... honest... I tried it myself this time):
// Make switch array
int num_events = 10;
pfSwitch **sw = (pfSwitch **) pfMalloc(num_events*sizeof(pfSwitch *),
pfGetSharedArena()) ;
for (int i = 0; i < num_events; i++ )
sw[i] = new pfSwitch();
At this point I start getting paranoid about C++ and shared arena stuff, and
start wondering if the sw variable should be in the shared arena as well. I
do this by putting sw in a struct that is allocated from the shared arena.
So can someone out there tell me if and how to use the new operators in
pfObject. Note that the man pages for libpr classes list both new functions
(including the one where you can specify an arena). On the other hand, libpf
classes inherit from pfUpdatable which in turn inherets from pfObject, but
the man pages only list one new operator which is actually specified in
pfUpdatable (as well as pfObject)....does the override of one new operator in
pfUpdatable hide both new operators in pfObject?
Thanks in advance,
scott
-- 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."It's just like having your computer screen lock up on you when you're using Microsoft Word. You have to hit the reset button."
-- Matt Wallace, NASA Rover Coordinator, on the solution to the modem problems on Sojourner in The Seattle Times July 6 1997. ======================================================================= List Archives, FAQ, FTP: http://www.sgi.com/Technology/Performer/ Submissions: info-performer++at++sgi.com Admin. requests: info-performer-request++at++sgi.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:55:36 PDT