Auto Pointer in Bada
Do anyone know any way to use smart_ptr
(Smart Pointer) or auto_ptr
(Auto Pointer) in Bada OS?
Bada OS has no std
namespace, so, Boost library porting is reall开发者_如何学Cy difficult.
Perhaps there is another way for memory managing?
Since Bada 1.0, STL are availables :
The bada application supports C++ based on the Standard C++ ANSI ISO 14882 2003, which includes the Standard Template Library (STL). This helps developers migrate the pre-existing standard library based applications to the bada platform with minimum effort. More specifically, bada supports an essential subset of libstdc++v3 (http://gcc.gnu.org/libstdc++/) comprising a full set of standard C++ functions specified in standard C++ ANSI ISO 14882 2003 and the entire Standard Template Library (http://www.sgi.com/tech/stl/). These standard C++ functions are frequently used.
Regarding Boost, boost 1.37 shared_ptr works perfect.
#include <auto_ptr>
using namespace std;
///...
auto_ptr<ByteBuffer> bb(new ByteBuffer());
bb->Construct(71);
精彩评论