巴达自动指针

发布于 2024-12-05 17:00:29 字数 151 浏览 2 评论 0原文

有谁知道在Bada OS中使用smart_ptr(智能指针)或auto_ptr(自动指针)的方法吗? Bada OS 没有 std 命名空间,因此 Boost 库移植非常困难。 也许还有另一种内存管理方法?

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 really difficult.
Perhaps there is another way for memory managing?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

眼眸 2024-12-12 17:00:29

从 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 中指定的全套标准 C++ 函数和整个标准模板库 ( http://www.sgi.com/tech/stl/)。这些标准 C++ 函数经常使用。

关于Boost,boost 1.37的shared_ptr工作得非常完美。

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.

┊风居住的梦幻卍 2024-12-12 17:00:29
#include <auto_ptr>
using namespace std;

///...


auto_ptr<ByteBuffer> bb(new ByteBuffer());
bb->Construct(71);
#include <auto_ptr>
using namespace std;

///...


auto_ptr<ByteBuffer> bb(new ByteBuffer());
bb->Construct(71);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文