Re: operator new() and operator delete()
Javier Abadia Miranda (jabadia++at++sfe.indra.es)
Wed, 21 Jul 1999 14:29:33 +0200
Geoff Levner wrote:
>
> Javier Abadia Miranda wrote:
> >
> > Hello:
> >
> > I want objects of a class to be allocated from shared
> > arena. I have overloaded operators new and delete as
> > follows:
> >
> > (snip)
> >
> > This seems to work. Is it the _right_ way to allocate
> > objects from shared arena?
> >
> > I'm wondering if I should derive this class and others
> > from pfObject or pfMemory to get this allocation behaviour
> > automatically.
>
> We do it the same way you do -- when we are not using Performer -- and
> it seems to me like the right way. But if you are using Performer, it
> is simpler to derive your class from pfObject or pfMemory, as you say.
> Note, however, that the default new operator for a pfMemory does NOT
> allocate from shared memory (you have to specify the arena), and that
> you cannot allocate a pfObject until you have called pfConfig() (I seem
> to recall).
>
> --
> Geoff Levner -- g.levner++at++acsys.it
> ACS Studio, via Aurelia 58, 00165 Roma, Italy
> tel. +39-063936331, fax +39-0639363317
Well, then what is most apropriate: deriving from pfObject or
from pfMemory? What is the difference, anyway?
--
Javier Abadia Miranda / Ingeniero en Informatica
MADRID (SPAIN) / Especialista en Informatica Grafica
This archive was generated by hypermail 2.0b2
on Wed Jul 21 1999 - 05:36:40 PDT