I'm using a control that I've created that may display several different UI layouts depending on the required situation many times over the course of the activity lifetime (which could be days without reboot/restart). Each UI layout may have 500 or more views contained therein which I do have record of in a standard LIST object.
This leads to my question: When clearing out the current layout in favor of displaying/loading a new layout, which method below is optimal or does it matter at all to the Android garbage collector?
Thanks in advance for any input.
This leads to my question: When clearing out the current layout in favor of displaying/loading a new layout, which method below is optimal or does it matter at all to the Android garbage collector?
- Individually .RemoveView on each UI element then clear my list of UI elements.
- Just use .RemoveAllViews on the UI parent panel then clear the list of UI elements.
- Just clear the list of UI elements and .Initialize the parent panel again.
- Some other procedure I've missed in the seemingly endless plethora of Android API updates.
Thanks in advance for any input.