
Hi Background: 1_33_1 Example : boost_1_33_1\libs\serialization\vc6ide\test_no_rtti I can run the example successfully on Debug mode with no warning and no error. However, it has several warnings, abnormal operation and memory leak when running on release mode. The following is the warnings: d:\barr\serialization\boost\boost_1_33_1_bk\boost\smart_cast.hpp(200): warning C4541: 'dynamic_cast' used on polymorphic type 'polymorphic_base' with /GR-; unpredictable behavior may result d:\barr\serialization\boost\boost_1_33_1_bk\boost\smart_cast.hpp(200): warning C4541: 'dynamic_cast' used on polymorphic type 'polymorphic_base' with /GR-; unpredictable behavior may result ..\..\..\boost\smart_cast.hpp(230) : see reference to function template instantiation 'T boost::smart_cast_impl::pointer<T>::polymorphic::cast(const U *)' being compiled with [ T=const polymorphic_derived2 *, U=type ] ..\..\..\boost\smart_cast.hpp(286) : see reference to function template instantiation 'T boost::smart_cast_impl::pointer<T>::cast(const U *)' being compiled with [ T=const polymorphic_derived2 *, U=type ] ..\..\..\boost\serialization\void_cast.hpp(136) : see reference to function template instantiation 'T boost::smart_cast<polymorphic_derived2 const *,polymorphic_base const *>(U)' being compiled with [ T=const polymorphic_derived2 *, U=const type * ] ..\..\..\boost\serialization\void_cast.hpp(133) : while compiling class-template member function 'const void *boost::serialization::void_cast_detail::void_caster_primitive<Derived,Base>::downcast(const void *) const' with [ Derived=const polymorphic_derived2, Base=const type ] ..\..\..\boost\serialization\void_cast.hpp(191) : see reference to class template instantiation 'boost::serialization::void_cast_detail::void_caster_primitive<Derived,Base>' being compiled with [ Derived=const polymorphic_derived2, Base=const type ] ..\..\..\boost\serialization\base_object.hpp(107) : see reference to function template instantiation 'const boost::serialization::void_cast_detail::void_caster &boost::serialization::void_cast_register(const Derived *,const type *)' being compiled with [ Derived=polymorphic_derived2 ] ..\..\..\boost\serialization\base_object.hpp(103) : while compiling class d:\barr\serialization\boost\boost_1_33_1_bk\boost\serialization\extended_type_info_typeid.hpp(92): warning C4541: 'typeid' used on polymorphic type 'polymorphic_derived2' with /GR-; unpredictable behavior may result Then the following is the console output after invoking the release exe file: Running 1 test case... unknown location(0): fatal error in "test_main_caller( argc, argv )": std::bad_typeid: Bad read pointer - no RTTI data! *** errors detected in test suite "Test Program"; see standard output for details Detected memory leaks! Dumping objects -> {263} normal block at 0x00983EA8, 4 bytes long. Data: <D E > 44 D1 45 00 Object dump complete. What should I do to make the release mode run correctly? Best regards Barr Ng _________________________________________________________________ Learn English via Shopping Game, FREE! http://www.linguaphonenet.com/BannerTrack.asp?EMSCode=MSN06-03ETFJ-0211E