|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r51185 - sandbox/mirror/libs/mirror/example/factories
From: chochlik_at_[hidden]
Date: 2009-02-10 10:43:25
Author: matus.chochlik
Date: 2009-02-10 10:43:25 EST (Tue, 10 Feb 2009)
New Revision: 51185
URL: http://svn.boost.org/trac/boost/changeset/51185
Log:
[mirror 0.3.x]
- minor fix
Text files modified:
sandbox/mirror/libs/mirror/example/factories/simple_gui.cpp | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
Modified: sandbox/mirror/libs/mirror/example/factories/simple_gui.cpp
==============================================================================
--- sandbox/mirror/libs/mirror/example/factories/simple_gui.cpp (original)
+++ sandbox/mirror/libs/mirror/example/factories/simple_gui.cpp 2009-02-10 10:43:25 EST (Tue, 10 Feb 2009)
@@ -10,6 +10,7 @@
* LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
+#include <boost/shared_ptr.hpp>
#include <boost/mirror/factory/wx_constructor_gui.hpp>
#include "./tetrahedron.hpp"
@@ -44,7 +45,7 @@
try
{
// use the factory to create a tetrahedron
- T* t = fact.create();
+ ::boost::shared_ptr<T> t(fact.create());
// if we were successful
if(t)
{
@@ -59,8 +60,6 @@
message,
wxT("Tetrahedron info")
);
- // and delete the instance
- delete t;
}
}
catch(::std::exception& e)
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk