Re: array of pfDCS

New Message Reply Date view Thread view Subject view Author view

Scott McCaskill (scott++at++paradigmsim.com)
Wed, 2 Jul 1997 18:04:26 -0500 (CDT)


On Tue, 1 Jul 1997, Ryan McKinley wrote:

>
> Hi -
>
> I'm trying to declare an array of pfDCS's. I tried:
>
> pfDCS dcsArray[4];
>
> and get the error: "storage size for 'dcsArray' isn't known"
>
> if I try:
>
> pfDCS *dcsArray;
> dcsArray = (pfDCS*) pfCalloc(4, sizeof(pfDCS), NULL );
>
> I get the error:
>
> "Reference of an expression of void type or an incomplete type."
>
> I think I have all the proper include files and compilation links. What
> am I doing wrong?
>
> Ryan McKinley
>

In short: this is bad. Don't do this.

>From the man page for pfDCS (pf2.0):

  new pfDCS creates and returns a handle to a pfDCS. Like other pfNodes,
  pfDCSes are always allocated from shared memory and cannot be created
  statically, on the stack or in arrays. pfDCSes should be deleted using
  pfDelete rather than the delete operator.

For related info on why this is so I recommend the man page for pfMemory.

-=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=- -=-
Scott McCaskill scott++at++paradigmsim.com

Paradigm Entertainment
(formerly Paradigm Simulation, now two companies) 972 960 2301

=======================================================================
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.