Re: C++ Runtime Binding

From: Ben Rush (kwendex_at_yahoo.com)
Date: 03/15/04


Date: Mon, 15 Mar 2004 15:47:14 -0600

I guess what I should have asked is how are the constructors and destructors
called without the CRT? My understanding, and it could be quite easily
flawed, is that without the startup code for the runtime, constructors and
destructors aren't called. But if they can be called in a _ATL_MIN_CRT
build, then something has to be doing the leg work.

"Igor Tandetnik" <itandetnik@mvps.org> wrote in message
news:exIvX8sCEHA.580@TK2MSFTNGP11.phx.gbl...
> Is what the result of ATL-implemented new and delete operators?
> --
> With best wishes,
> Igor Tandetnik
>
> "For every complex problem, there is a solution that is simple, neat,
> and wrong." H.L. Mencken
>
> "Ben Rush" <kwendex@yahoo.com> wrote in message
> news:%23mpLn1sCEHA.2628@TK2MSFTNGP11.phx.gbl...
> > Is this the result of ATL-implemented new and delete operators?
> >
> >
> > "Igor Tandetnik" <itandetnik@mvps.org> wrote in message
> > news:u2oavqrCEHA.1456@TK2MSFTNGP09.phx.gbl...
> > > "Ben Rush" <kwendex@yahoo.com> wrote in message
> > > news:OHWV6erCEHA.3748@TK2MSFTNGP11.phx.gbl...
> > > > I see that, by default, ATL doesn't bind to the C++ runtime
> for
> > > > efficiency. My understanding is that, then, constructors and
> > > destructors
> > > > wouldn't be called if I were to create my own C++ class in an ATL
> > > project,
> > > > am I correct?
> > >
> > > In ATL3, constructors and destructors of global and static objects
> are
> > > not called in MinCRT build. Everything still works for automatic
> (those
> > > created on the stack) and dynamic (those created with new) objects.
> > >
> > > In ATL7 (shipped with VC7[.1]), global and static objects work fine
> even
> > > in MinCRT builds.
> > > --
> > > With best wishes,
> > > Igor Tandetnik
> > >
> > > "For every complex problem, there is a solution that is simple,
> neat,
> > > and wrong." H.L. Mencken
> > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: C++ Runtime Binding
    ... What you're saying is that when the CRT is linked, ... that calls the constructors and destructors of global/static objects. ... Notice Igor carefully referred to global/static objects' constructors/ ...
    (microsoft.public.vc.atl)
  • Re: C++ Runtime Binding
    ... I believe you are under the misconception that constructors and ... destructors only, since these are the only ones affected in ATL3. ... > "Igor Tandetnik" wrote in message ... >>> called without the CRT? ...
    (microsoft.public.vc.atl)
  • Re: C++ Runtime Binding
    ... > that calls the constructors and destructors of global/static objects. ... calls to constructors and destructors are emitted at compile time ... The start-up code (be it in CRT or ATL7) simply ...
    (microsoft.public.vc.atl)
  • Re: C++ Runtime Binding
    ... > called without the CRT? ... > flawed, is that without the startup code for the runtime, constructors ... ATL7 essentially replicates the necessary start-up code - just enough of ... it to run constructors and destructors of global objects. ...
    (microsoft.public.vc.atl)
  • C++ Runtime Binding
    ... My understanding is that, then, constructors and destructors ... wouldn't be called if I were to create my own C++ class in an ATL project, ...
    (microsoft.public.vc.atl)

Loading