1

有人知道在 Bada OS 中使用smart_ptr(Smart Pointer) 或auto_ptr(Auto Pointer) 的任何方法吗?Bada OS 没有std命名空间,所以,Boost 库移植非常困难。也许还有另一种内存管理方式?

4

2 回答 2

1

从 Bada 1.0 开始,STL 可用

bada 应用程序支持基于标准 C++ ANSI ISO 14882 2003 的 C++,其中包括标准模板库 (STL)。这有助于开发人员以最小的努力将现有的基于标准库的应用程序迁移到 bada 平台。更具体地说,bada 支持 libstdc++v3 (http://gcc.gnu.org/libstdc++/) 的基本子集,包括标准 C++ ANSI ISO 14882 2003 和整个标准模板库 ( http://www.sgi.com/tech/stl/)。这些标准 C++ 函数经常被使用。

关于 Boost,boost 1.37 shared_ptr 完美。

于 2011-09-25T15:49:37.210 回答
0
#include <auto_ptr>
using namespace std;

///...


auto_ptr<ByteBuffer> bb(new ByteBuffer());
bb->Construct(71);
于 2012-05-28T15:59:20.657 回答