Android Question Multiple executions of the same loadlayout

chuck3e

Active Member
Licensed User
Longtime User
If my app does multiple executions of the same Loadlayout, do the previous Loadlayouts accumulate in memory? Or is there something I need to do to cleanup older Loadlayouts?
 

klaus

Expert
Licensed User
Longtime User
To make this thread really useful I suggest you to show us the code you used.
Then the helpers could tell:
Don't use this code because of this, this and this.
Prefer that code because of that, that or that.
Or that other code ...
 
Last edited:
Upvote 0

LucaMs

Expert
Licensed User
Longtime User
I understand. It is hard to ask accurate questions via text. I think DonManfred has my answer, but to clarify: Depending on how often the user wants to return to the same layout, it may get loaded many times. My concern is if I need to do something to "clean it out" before loading the same one again, or will it keep building up somewhere in memory and causing some resource limit to be exceeded.
1 - Use B4XPages and you will never need to load the same layout multiple times.

2 - If you load the same layout several times, the number of views will increase, although theoretically they would always be the same, ie you will have duplicates of the same views.

If you want, you can use RemoveAllViews before reloading a layout.
 
Upvote 0
Top