I have multiple View Controllers set up that have a UIDatePicker in each view. I began testing using the Leaks tool and there are no Leaks from the date picker. Next I began testing using the allocations tool and this is where I’m finding all of the problems. Every each date picker is initialized in viewDidLoad I set the datepicker mode like this:
datePicker.datePickerMode = UIDatePickerModeDate;
Each time a View Controller that contains a date picker is displayed there are multiple allocations of “Malloc 392 KB” which eventually leads to the crash of the app. When digging deeper in the allocations tool it states that the responsible caller is [UISectionRowData:RefreshWithSection….]. I’m not sure how to approach this and fix it. Any help would be great. Attached are some screenshots from the allocations tool.



I think the line
is probably misleading and it’s probably the next line causing the leak
my guess would be date has a synthesized inputView variable which is retaining the object. Given you’re doing alloc and init and no autorelease on this line…
I’d expect this is the leak but hard to say as you may be calling release later but if not this would be my guess.