Information:
I have a database table with 200.000 entries.I am using an ArrayList
which holds 100 Buttons
each time(Each Button
has the info from the table entry it matches).
When the right arrow key is pressed the ArrayList
is being cleared and the next 100 entries of dataBase table are added(as Buttons
).
What i want to say is that every time i search the dataBase or i press left or right keys the ArrayList
is cleared and added with 100 new Button
.
The Problem
Should i reuse the existing buttons passing different values or just clearing them and creating new ones?
If i create new Buttons it consumes more memory ?If i reuse the same Buttons it doesn't consume extra memory?