Hi all, I've some memory issues with a view controller that contains a text field.
Brief summary:
Clicking on a button my application modally presents a UIViewController
(that I will call "VC1").
From VC1 the user can optionally open (using pushViewController
) a UITableViewController
("VC2") and turn back.
From VC1 the user can optionally open (using pushViewController
) a UIViewController
("VC3") and turn back.
...and finally the user can dismiss VC1
VC2 and VC2 are referenced in VC1 as properties and they have to remain in memory. When the user dismisses VC1 then I release all.
VC3 contains a simple view with only one UITextField that becomeFirstResponder
when viewWillAppear
is invoked.
Issues:
When I open VC1 and then VC2, turn back and dismiss: it's all ok, the application returns to the same initial amount of "Live bytes" (that is 1,20MB).
When I open VC1 and then VC3, bytes become 2MB. When I write something inside the text field allocations rise to 2,50MB
1) In this moment Instruments discovers a memory leak of 16byte with ProofReader as Responsible Library and PRRfInit as Responsible Caller
2) After turning back to VC1 and dismissing, the allocations remain to 2,50MB Ordering by category in Instruments I checked that VC1, VC2 and VC3 have 0 live bytes, but the overall remains to 2,50MB
Is also involved the keyboard?