简体   繁体   English

iPhoneOS上是否存在弱引用的任何类==>无

[英]Is there any class for weak References on iPhoneOS ==> none

My APP received a big data that was used about twice times. 我的APP收到了大约两次使用过的大数据。 So, I think It`ll cause a memory problem. 因此,我认为它将导致内存问题。

In this case I use the WeakReference class on java. 在这种情况下,我在Java上使用WeakReference类。 But, I couldn`t find any class for weak references like java. 但是,我找不到像Java这样的弱引用类。

Is there any class for weak refereces on iPhoneOS? iPhoneOS上是否存在弱裁判的类别?

Is this the only way in this case, that using didReceiveMemoryWarning method and release code. 在这种情况下,这是使用didReceiveMemoryWarning方法和发布代码的唯一方法。

Thx. 谢谢。

iPhoneOS SDK does not support garbage collection so classes that implement weak referencing are not really needed. iPhoneOS SDK不支持垃圾回收,因此实际上不需要实现弱引用的类。 What I would suggest is that you run your app through Instruments (Choose Run->Run WIth Performance Tools->Allocations from Xcode 3.2.3. This will help you understand the memory usage of your app and detect possible leaks. 我的建议是,您通过Instruments运行您的应用程序(从Xcode 3.2.3中选择Run-> Run WIth Performance Tools-> Allocations)。这将有助于您了解应用程序的内存使用情况并检测可能的泄漏。

我想,如果要处理大数据,应该使用持久性存储,因为内存将不允许您超出其限制。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM