Load UITableView crash caused by message sent to deallocated instance

前端 未结 1 1221
长情又很酷
长情又很酷 2021-01-27 05:05

My test app loads a UITableView and crash caused by [1421:12503] *** -[__NSArrayM class]: message sent to deallocated instance 0x10ae83e0. Process stopped at main()

1条回答
  •  鱼传尺愫
    2021-01-27 05:32

    I'm guessing that the NSArray you are using for the data source is autoreleased. Check it out and retain it. That will probably fix this, but I can't really be sure without some code, especially on how you are creating this array.

    Don't forget to release the array in dealloc when you're done.

    0 讨论(0)
提交回复
热议问题