On Android, writing in Java is a calculator program that has its own methods for checking the string for incorrect characters, and then deleting them, or fixing them, a kind of checking for the correctness of the expression, and the check will occur after each press. And, accordingly, either instances of classes will be constantly created, or the methods of the main class will refer to the static methods of another class. What can affect the cost of phone resources. He is interested in how much this affects the speed of execution of the program's methods, with much threading, without it. thank you in advance.
- oneIf instances of classes are not created in the amount of tens of millions of pieces, then there should be no problems - DreamChild
- Well, 100 times, hits and creatures for one click of the button will not be. and what does it mean even if 1000 class creations do not cause a problem? since you are talking about millions. By problem, I mean naturally the long reaction of the application. - Pashka Fincler
- oneit’s strange to worry that objects are created in an object-oriented language, otherwise it doesn’t work as if ... the only thing you have to worry about in this context is memory leaks (classes no longer needed that the garbage collector cannot for some reason or other remove) - the garbage collector will take care of the rest - pavlofff
- Well, it is clear that for you the knowledge of fundamental things gives the answer to my question, but something I read here what OOP and other methods are, and it does not come as if I read a book I see a fig, in 10 years I can begin to understand. that is, for me, in terms of theory, I need an example, an analogue, and then I will only begin to understand. thanks for the answer. - Pashka Fincler
|