android - Is nullifying every views and listeners a good idea in finding or correcting leaks? -
i working on project , keep seeing methods nullify views , listeners on every ondestroy(). have seen code navigate rootview , set every listener null.
the original coder told me has done way prevent leaks, think causing more harm vm. think?
in opinion, unnecessary. once activity destroyed (i.e. ondestroy called) views , related listeners qualified garbage collection.
however, make sure not treating static
activity and/or bound activity's context (that includes views too).
Comments
Post a Comment