Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有像 instagram 这样的 feed 的应用程序。当我滚动它时,它会加载越来越多的图像。所以有一刻,iOS 向我发送了内存警告,我不知道该怎么办。如果我让 array(feed) 等于 nil,什么都不会发生
这是我的对象分配:
您应该拥有dealloc任何不需要或可重新创建的资源,例如数组中的一些图像,您可能会在其中保存应用程序自人类创建以来下载的所有图像*。
dealloc
*请注意,强烈不建议这样做。