<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=windows-1252">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2448.0">
<TITLE>RE: [LC++]Question about ctors and dtors</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>&gt; See the following code. When run, the output is only for the test()</FONT>
<BR><FONT SIZE=2>&gt; member. There is no output for the ctor and dtor. Why? Surely </FONT>
<BR><FONT SIZE=2>&gt; an object</FONT>
<BR><FONT SIZE=2>&gt; of the bogus class is being created?</FONT>
</P>

<P><FONT SIZE=2>You didn't insert anything in there.</FONT>
<BR><FONT SIZE=2>mv[0] returns a reference to an object (in this case, something</FONT>
<BR><FONT SIZE=2>referencing memory after the array, which was not constructed).</FONT>
<BR><FONT SIZE=2>It's not assigned, but used as a temporary, so the result won't</FONT>
<BR><FONT SIZE=2>be copied (therefore no copy ctor).</FONT>
</P>

<P><FONT SIZE=2>-- </FONT>
<BR><FONT SIZE=2>Vincent Penquerc'h </FONT>
</P>

</BODY>
</HTML>