Article View: comp.std.c++
Article #3659Re: stack variables and new constructor
From: Jason D. Morris
Date: Wed, 13 Mar 1996 23:49
Date: Wed, 13 Mar 1996 23:49
25 lines
1732 bytes
1732 bytes
On 13 Mar 96 15:04:23 GMT, "Jon.Cassorla" <cassorla@casey.columbiasc.ncr.com> wrote: >1) For a variable that is declared locally to a function of a structure > type, is the standard new constructor executed to allocated the > memory for the data structure? new is an operator not a constructor. The non-overloaded form of operator new allocates memory in which an object can be constructed. After the memory is allocated, the object's ctor is called to build the object from raw memory. >2) When using "new" to allocate data space for a variable of a structure > type (ie no constructor defined), is the resulting memory space zero'd > out as a standard? No. Jason --- [ comp.std.c++ is moderated. To submit articles: try just posting with ] [ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ] [ FAQ: http://reality.sgi.com/employees/austern_mti/std-c++/faq.html ] [ Policy: http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ] [ Comments? mailto:std-c++-request@ncar.ucar.edu ]
Technical Details
Message-ID:
<31474f39.7878879@nntp.ix.netcom.com>Path:
arc1-ca.pugleaf.net!in2.uu.net!bounce-backReferences:
<Do7nuy.HsF@ncrcae.ColumbiaSC.ATTGIS.COM>Show Full Headers
Complete Article Headers
From: jdmorris@ix.netcom.com (Jason D. Morris) Message-ID: <31474f39.7878879@nntp.ix.netcom.com> X-Original-Date: Wed, 13 Mar 1996 22:45:40 GMT Path: arc1-ca.pugleaf.net!in2.uu.net!bounce-back Date: 13 Mar 96 23:49:09 GMT Approved: fjh@cs.mu.oz.au Newsgroups: comp.std.c++ Subject: Re: stack variables and new constructor Organization: Netcom References: <Do7nuy.HsF@ncrcae.ColumbiaSC.ATTGIS.COM> X-Netcom-Date: Wed Mar 13 2:44:54 PM PST 1996 X-Newsreader: Forte Agent .99d/32.182 X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUBMUdfA+EDnX0m9pzZAQECQQF+MZytslmydvAcpStk5KG0d+1BpJRdRVSj PKTH552HUKOcTmfeWU3hhhQ97oDXe/GZ =TavA