3 ms·
> Wrong. Ran out of memory Android VM(DVM) is different from the JVM we are usually talking about. When developing Android apps, you need to understand the lif
by namelezz 10y ago
> Wrong. Ran out of memory
Android VM(DVM) is different from the JVM we are usually talking about. When developing Android apps, you need to understand the life cycle of components to prevent memory leaking. Your issue may come from your poor understanding of Android platform.
- digler999 10y ago> Your issue may come from your poor understanding of Android platform. possibly. But what is my responsibility as a developer ? If I learn a standardized language do I now have to learn the JVM/DVM standards of how its implemented ? Whats wrong with a destructor being called when an object goes out of scope and have its resources freed ? If I have to now worry about how the VM implements that, learning the language was useless.
- pjmlp 10y agoSure you have to. It is no different than having to learn what gcc, clang, Visual C, aCC, SunPro, xlc, icc ... do to your C code outside of what ANSI C specifies how it should behave. And even for those parts that the ANSI C specifies how it should behave, those compilers do not generate the 100% same code. Also one needs to know how the underlying OS and CPU handle that generated code as well. Specially interesting regarding the understanding of the underlying OS on UNIX platforms, is to learn how much the platform deviates from the POSIX specification in regards implementation specific semantics, because POSIX just like ANSI C, leaves platforms quite some freedom of implementation. Understanding the target platform is always required.
- cel1ne 10y agoAre you talking about finalizers? They often are mistaken for destructors, which they are not. Android has a terrible (terrible!) sdk, in my opinion, but that is not java's fault.