Veraart (rioj7++at++fel.tno.nl)
Tue, 23 Jul 1996 10:04:24 +0200 (MET DST)
I haven't tried but is the explicit placement with the new operator working.
It's just a combine of both code samples.
pfVec3 *vertex;
char *buffer;
buffer = pfMalloc(2*sizeof(pfVec3),pfGetSharedArena());
if (buffer != (force_vertex = new (buffer) pfVec3[2]))
{
cerr << "Unable to pfMalloc vertex list array.\n";
exit(3);
}
For pfVec3 objects you don't get much benifit from this but if the objects
need the constructor than this is the method according to my C++ book.
Mario
=======================================================================
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:53:12 PDT