Hey, I'm new to Android and kindly correct if I'm wrong: I'm trying to control the number of objects created and a bunch (which obviously depends on the number of objects) through DDMS. During this, if I run the application, I have "n" no. created object. Pressing the return button will not necessarily call the Destroy () function, and therefore the number of objects will still be "n". Now that I have started the application again, onCreate () will be called again and these "n" objects will be created again (now the total number of objects will be greater than "n"). Thus, repeating this process (restarting the application) will lead to a continuous increase in the number of objects? (which obviously should not be)
source share