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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -