4
I would like to know how to destroy the erase completely a ArrayList and a List in full at runtime.
example:
ArrayList<Elemento> e = new ArrayList();//Elemento e uma classe
for (int i = 0; i<10;i++)
{
e.add(new Elemento());
e.get(i).texto = "teste";
e.get(i).texto2 = "algo";
e.get(i).numero = i;
}
How to destroy e completely or erase it?
...
e.clear()?– Pablo Almeida
Do you want to reset the elements or make them all disappear? What do you mean by destroying, or completely or erasing?
– Maniero
@moustache that all disappear , as if not created.
– Vale
Really the
.clear()solved the problem– Vale