Memory Leaks On Dynamically Added Text View On Android
I have LinearLayout in which i dinamically add and remove TextView. To remove them i just call .removeAllViews(); This off course causes a huge memory leak. Is their any way i rele
Solution 1:
Where is the memory leak? You don't need to release memory as you had to do in C/C++. The GC will collect your TextViews if there are no more references to them.
Solution 2:
don't try to add textview in viewgroup. Make a design consisted of linearlayout, and add the textview, and delete view according to their index.
Post a Comment for "Memory Leaks On Dynamically Added Text View On Android"