Re: placement new , is this acceptable?

From: lallous (lallous_at_lgwm.org)
Date: 02/11/04


Date: Wed, 11 Feb 2004 14:02:23 +0200


"Claudio Puviani" <puviani@hotmail.com> wrote in message
news:ZAaWb.4774$rv1.3102017@news4.srv.hcvlny.cv.net...
> "lallous" <lallous@lgwm.org> wrote
> > "Claudio Puviani" <puviani@hotmail.com> wrote
> > >
> > > Aside from the fact that this is an overly convoluted way to do
things,
> > > [...]
> >
> > My question is whether the method used to create/destroy an instance is
> > acceptable?
>
> What part of "overly convoluted" doesn't answer your question? I suppose
one
> could get philosophical and ask "acceptable by who's standard?", but in

Is the usage of placement new and calling the destructor like that a correct
one C++ syntax wise?

I heard there is "overhead" or extra bytes that needs to be allocated in
addition to the size of the class?

[snip ...book recomendation...]

--
Elias


Relevant Pages

  • Re: Unusual usage of IUknown
    ... ptA = new A; ... calling V constructor, szData=V ... calling A destructor, szData=A ...
    (microsoft.public.vc.language)
  • Re: Unusual usage of IUknown
    ... char * szData; ... calling V constructor, szData=V ... calling A destructor, szData=A ...
    (microsoft.public.vc.language)
  • Re: "issue" meaning "problem"
    ... This usage is long familiar in N.America and probably Britain ... Much of my work these days is in engineering design. ... end product does not work as intended, then there is a fault somewhere ... Calling it an issue is ...
    (alt.usage.english)
  • Re: "issue" meaning "problem"
    ... This usage is long familiar in N.America and probably Britain as ... Much of my work these days is in engineering design. ... Calling it a fault ...
    (alt.usage.english)
  • Re: Virtual dtor and placement new.
    ... >> How to use virtual destructors when dealing with placed memory? ... > Short answer is: don't use placement new. ... // overload new with myFunAllocator; ... destructor call? ...
    (comp.lang.cpp)