Welcome, Guest
Username Password: Remember me

Memory warning makes model lose connection to tabl
(1 viewing) (1) Guest
  • Page:
  • 1

TOPIC: Memory warning makes model lose connection to tabl

Memory warning makes model lose connection to tabl 1 year, 8 months ago #1

I use a SCTableViewController in a UIPopoverController.

Everything works fine, but when the popover is not shown and I simulate a memory warning in the iPad Simulator, the next time the popover is shown, the tableview is empty.

To find out what happens, I added NSLog-Statements in viewDidAppear:
NSLog(@"%@", self.tableView);


This is what shows up in the console:
<UITableView: 0x6047a00>
Received simulated memory warning.
<UITableView: 0xb81da00>
 


As you see, the address of self.tableView changes between calls. So the tableViewModel (and thus the table view delegate and datasource) is still connected to the old tableview while the table view controller has created a new tableview.

Unfortunetely the modeledTableView property of SCTableViewModel is read-only but it should really be set to the new table view that is created after a memory warning.

I hope this makes sense to you.

Thanks,

Alexander
  • Lextar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0

Re: Memory warning makes model lose connection to tabl 1 year, 8 months ago #2

Hi Alexander,

Are you able to send us this project at our support email? Thanks a lot.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Memory warning makes model lose connection to tabl 1 year, 8 months ago #3

No, because it has too much code that I can't publish.

But I will create a small demo project demonstrating the issue tomorrow.
  • Lextar
  • OFFLINE
  • Fresh Boarder
  • Posts: 2
  • Karma: 0

Re: Memory warning makes model lose connection to tabl 1 year, 8 months ago #4

Thanks a lot Alexander, we appreciate your efforts to help us replicate the problem.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72

Re: Memory warning makes model lose connection to tabl 1 year, 7 months ago #5

Just sent you our Sensible TableView 1.6 BETA2 version that fixes this bug. Please confirm. Thank you very much Alexander.
  • tarekskr
  • OFFLINE
  • Administrator
  • Posts: 2402
  • Karma: 72
  • Page:
  • 1
Time to create page: 1.49 seconds