I used to read various blogs and recommendations that pooling normal Java objects (not objects like connections or the like) does not improve and may actually decrease the performance, being an anti-pattern. However this is much less common to hear about the Android platform, and many gaming libraries, for instance, provide classes for reusing existing objects. Now I read that object pooling reduces the number of the garbage collection cycles, improving the performance.
How is a desktop computer so different from the mobile device that a different development pattern is recommended? The probable answers could be
- Object pooling also makes desktop application run better
- Object pooling does not actually help with Android applications
- There are some important differences between Java SE and Android JVM.
- Object pooling is not recommended for the desktop because using it brings less benefits than it brings for mobile applications (but does, so may be good in some cases?)