I usually initialize all the views (xnGrids included) in the Activity_Create.
Then i clear/add/delete rows from the xnGrids.
You can try but i do not think this is the problem.
If there is a problem at all.
B4A is java and java has a garbage collector.
It means you never destroy any object,
the garbage collector destroys the objects when needed.
The xnGrid uses a java list to hold the data and an android listview to display the items.
I've implemented an adapter so the views of each row are recycled when needed.
Only the views of the rows that are visible are created.
Everything is destroyed (again) when needed but i can't tell you when.
Android is unix/linux. And usually a unix machine uses as much ram as possible.
I know i'm quite obscure and vague.
And obviously i'll try to figure out if there is a problem.
But there are many memory allocation and object management
policies i have no knowledge or control of.
What i can tell for sure instead is that i use this grid in at least 15 app in a production environment since 2012.
I have more the 50 android devices and i've never experienced low memory problems.
Thanks for your post.
You've given me something to think about.
