What is “error in __connection_block_invoke_2: Connection interrupted” in iOS?

独自空忆成欢 提交于 2019-11-26 14:16:11

问题


I am tried to make iOS Application using AFNetworking in UITableView. TableView loads 20 datas like Twitter's timeline.

When it loads over 80 datas, Xcode shows spending about 70MB memory and console shows

"Received memory warning."

And

**"error in __connection_block_invoke_2: Connection interrupted".**

What is this and How do I treat this error?


回答1:


Reason: When you load more data which contains above 70 mb will get crash.

Sol: Load data (EG:)40 only at a time. Then load another (EG:)40 next time by fetching data from web service. Fetch (EG)40 data by hitting service each time & reload tableview using pull to refresh concept.

  • 260 MB of ram (iPad 2)
  • 170-180MB of ram on devices with 512 Mb of ram total (iPhone 4, iPod touch 4g)
  • 40-80MB of ram on devices that have 256 MB of ram (iPad, iPhone 3gs, iPod touch 3g)
  • 25 MB on device with only 128MB of ram (IPhone 3g, iPhone 2g, iPod touch 1g-2g)

Refer following links to know about memory leakage:

  1. Max Memory
  2. Memory limit


来源:https://stackoverflow.com/questions/27372330/what-is-error-in-connection-block-invoke-2-connection-interrupted-in-ios

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!