programmatically add item

Screen.addView(ImageView);

then do

Screem.revomeView(ImageView)

why after that the application occupied by the application (specifically the ImageView element) is not cleared?

If ImageView.setBackgroundResource(0); The picture disappears (which is logical), but the memory occupied again is not cleared.

    1 answer 1

    Java memory is a garbage collector. It is called at an indefinite time. And if at the moment of the next call on the ImageView there are no active links, the memory will be cleared. Learn how garbage collection in Java works .