Re: C++ Runtime Binding
From: Alexander Nickolov (agnickolov_at_mvps.org)
Date: 03/16/04
- Next message: Alexander Nickolov: "Re: Frame <-> View "communication""
- Previous message: Alexander Nickolov: "Re: Using atl in VC6"
- In reply to: Ben Rush: "Re: C++ Runtime Binding"
- Next in thread: Ben Rush: "Re: C++ Runtime Binding"
- Reply: Ben Rush: "Re: C++ Runtime Binding"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 15 Mar 2004 17:19:28 -0800
I believe you are under the misconception that constructors and
destructors are called by new and delete from the CRT, whereas
in fact they are not - they are inserted by the compiler, while
new/delete merely allocate/deallocate the memory.
Notice Igor carefully referred to global/static objects' constructors/
destructors only, since these are the only ones affected in ATL3.
-- ===================================== Alexander Nickolov Microsoft MVP [VC], MCSD email: agnickolov@mvps.org MVP VC FAQ: http://www.mvps.org/vcfaq ===================================== "Ben Rush" <kwendex@yahoo.com> wrote in message news:%23MSS0suCEHA.2888@TK2MSFTNGP09.phx.gbl... > Okay, thanks Igor. > > So to summarize, one can pretty much use new and delete throughout ATL w/out > noticing any ill effects; things are done for us under the hood to make us > feel, at least with new and delete, that we are fully bound to the C++ > runtime. > > Thanks, > Ben > > > "Igor Tandetnik" <itandetnik@mvps.org> wrote in message > news:uogyGytCEHA.1544@TK2MSFTNGP09.phx.gbl... > > "Ben Rush" <kwendex@yahoo.com> wrote in message > > news:%23x0F%23ctCEHA.3928@TK2MSFTNGP09.phx.gbl... > > > 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. > > > > ATL7 essentially replicates the necessary start-up code - just enough of > > it to run constructors and destructors of global objects. > > -- > > With best wishes, > > Igor Tandetnik > > > > "For every complex problem, there is a solution that is simple, neat, > > and wrong." H.L. Mencken > > > > > > >
- Next message: Alexander Nickolov: "Re: Frame <-> View "communication""
- Previous message: Alexander Nickolov: "Re: Using atl in VC6"
- In reply to: Ben Rush: "Re: C++ Runtime Binding"
- Next in thread: Ben Rush: "Re: C++ Runtime Binding"
- Reply: Ben Rush: "Re: C++ Runtime Binding"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|