当我使用持久对象在黑莓上保存数据时,出现错误未捕获内存?
我使用 Persisten 对象来保存数据,但是当我在模拟器上运行我的应用程序时,出现错误对话框
Uncaught out off memory
并在真实设备上运行,加载和运行需要很长时间。 我做错了什么?请帮我
I use Persisten Object to save data but when I run my application on Simulator, have an error dialog
Uncaught out off memory
and run on real device, it take very long time to load and run.
What did I do wrong? Please help me
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
BlackBerry® Persistent Store API 旨在提供灵活且强大的数据存储接口。借助 BlackBerry Persistent Store API,您可以将整个 Java® 对象保存到内存中,而无需先序列化数据。当启动应用程序时,您可以从内存中检索 Java 对象并处理信息。持久存储不存在大小限制;但是,存储中单个对象的限制为 64 KB。
BlackBerry Persistent Store API 不提供关系数据库模型。您必须创建有效的对象模型,并根据需要使用索引和哈希表管理对象之间的关系。
存储持久数据的示例示例
< a href="http://supportforums.blackberry.com/t5/Java-Development/Best-Practices-for-Persistent-Store/ta-p/1154881" rel="nofollow">持久存储的最佳实践
The BlackBerry® Persistent Store APIs are designed to provide a flexible and robust data storage interface. With the BlackBerry Persistent Store APIs, you can save entire Java® objects to memory without having to serialize the data first. When you start the application, you can retrieve the Java object from memory and process the information. No size limit exists on a persistent store; however, the limit for an individual object within the store is 64 KB.
The BlackBerry Persistent Store APIs do not provide a relational database model. You must create an effective object model and manage the relationships between objects, as necessary, using indices and hash tables.
sample example of storing persistent data
best practice for persistent storage