ios - I need some clarification about whether I should (could?) deallocate view-related UI elements or not -
so understand, should release objects own. (alloc/copy/retain
stuff)
and understand(kinda?), if had @property
retain
in of class, or instance variable alloc/init, should write custom dealloc make sure ones gets deallocated class.
what not understand should manually release cell
objects example? (since creating in cellforrowatindexpath
alloc/init? yea, know, tableview should kill cells when gets deallocated, want make sure?
also, manually release uilabel
, uitextfield
, on? know gets killed when deallocate view, again, still, want make sure?
update: yea, tip reference counting, project exact purpose simple stuff, using manual memory management. funny how of tutors nowadays skips part entirely novice myself have figure stuff themselves.
unless have strong
/retain
pointer ui element automatically dealloced once go out of screen.
regarding cell
s - should never dealloc
them because they're intended reused. if dealloc
, re-init
them you'll really bad performance while scrolling.
also, glorfindel said, consider using arc (if you're not using already) , life easier.
Comments
Post a Comment