Oh, Thank god, so at least it is not only me. :)<br><br>I just double-check this, and this behavior not only happened in debug build, it will happen in release build too,<br>But the pointer showing up would not be 0xcccccccc but something arbitrary.<br>
<br>P.S.: I have already changed to follow you guys&#39;  advices to pass by value, and I will try best to avoid this reference swamp.<br><br><div class="gmail_quote">On Fri, Mar 13, 2009 at 4:57 PM, athor <span dir="ltr">&lt;<a href="mailto:thorena@gmail.com">thorena@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I just reproduced the behaviour. Out of habit, I compiled with release the<br>
last time. Using a debug build, I get the same behaviour (using const&amp;,<br>
non-const&amp; etc).<br>
<br>
I&#39;m guessing this is a case of &quot;undefined behaviour&quot; resulting from mixing<br>
Debug/Release dll&#39;s. Changing to Release (or reading Daves link) should<br>
help.<br>
<br>
Passing shared_ptr by value and not by ref is still recommended though :)<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://www.nabble.com/why-does-the-%22shared_ptr%3CX%3E-const-%22-silently-become-0xCCCCCCCC-tp22449314p22492427.html" target="_blank">http://www.nabble.com/why-does-the-%22shared_ptr%3CX%3E-const-%22-silently-become-0xCCCCCCCC-tp22449314p22492427.html</a><br>

</font><div><div></div><div class="h5">Sent from the Python - c++-sig mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
Cplusplus-sig mailing list<br>
<a href="mailto:Cplusplus-sig@python.org">Cplusplus-sig@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/cplusplus-sig" target="_blank">http://mail.python.org/mailman/listinfo/cplusplus-sig</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Time is mana, we must hurry<br>