[Nel] maybe bug

jaleco jaleco@svr1.gameone.com.tw
Wed, 21 Feb 2001 18:37:46 +0800


This is a multi-part message in MIME format.

------=_NextPart_000_0021_01C09C35.623341E0
Content-Type: text/plain;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

first I am a newbies for c++,so maybe I am wrong.

file moves.cpp=20
     auto_ptr<CConfigFile> cf2( new CConfigFile() );
    auto_ptr<CConfigFile> cf( new CConfigFile() );
seem to wrong, becuase auto_ptr will delete content when leave local =
stack.
but ccconfigfile store it to vector container , this will cause bad =
thing .
did it ?


------=_NextPart_000_0021_01C09C35.623341E0
Content-Type: text/html;
	charset="big5"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; charset=3Dbig5">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT size=3D2>first I am a newbies for c++,so maybe I am =
wrong.</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2>file moves.cpp </FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp;&nbsp; auto_ptr&lt;CConfigFile&gt; =
cf2( new=20
CConfigFile() );</FONT></DIV>
<DIV><FONT size=3D2>&nbsp;&nbsp;&nbsp; auto_ptr&lt;CConfigFile&gt; cf( =
new=20
CConfigFile() );<BR>seem to wrong, becuase auto_ptr will delete content =
when=20
leave local stack.</FONT></DIV>
<DIV><FONT size=3D2>but ccconfigfile store it to vector container , this =
will=20
cause bad thing .</FONT></DIV>
<DIV><FONT size=3D2>did it ?</FONT></DIV>
<DIV><FONT size=3D2></FONT>&nbsp;</DIV></BODY></HTML>

------=_NextPart_000_0021_01C09C35.623341E0--