J
Jack Klein
Please;
Given something like:
main() {
int * label = new int[123456789];
for(;
if ( /* somecondition == true */) { goto end; }
/* do something sane for a long time*/
end:
delete[] label; // is this _necessary_ in this case?
return 0;
}
IOW, if the array[] is used right up until the program terminates, is it
necessary to delete the array[]?
(Does a terminated C++ program 'leave anything behind' that affects the
machine?
Doesn't termination of a program release any memory that was associated with
it?)
Tnx
jb
--
Peace
JB
(e-mail address removed)
Web:http://tetrahedraverse.com
Operating systems give memmory to the processes, processes can manage
this memmory. When a program terminates the operating system will know
and will reuse the memmory.
#1. Please don't quote signatures. If you want to use Google instead
of a proper newsreader, find the option that turns them off, of, if
there isn't one, trim them manually.
#2. Where exactly in ISO 14882 (the C++ language standard) did you
find the statement processes and reuse of memory? Where, in fact, in
the C++ standard, do you find any requirements that it places on
operating systems?
--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html