This post is brought to you by Applico’s monthly Lunch n’ Learn series. Each month, Applico holds a platform specific (Android, iOS, etc.) developer meet-up to discuss new findings, bugs, ideas and anything else relating to the current state of the OS they work on every day. Today, we’ll be discussing the devious garbage collector and why it’s best not to trust “him.”
Memory is a precious, precious resource for our tiny hand computers. Garbage is memory that has been used but is no longer needed. The garbage collector is responsible for cleaning up this garbage on a periodic basis. However, we have found Bitmaps and the garbage collector have an odd relationship. The garbage collector will eventually clean up bitmaps. However, since efficiency is paramount, this simply isn’t good enough.
Remember to recycle bitmaps after the code is done. It happens immediately and saves memory. Don’t count on the garbage collector to come around and do it for you. One of the telltale signs of a poorly programmed app is memory leaks and negative effect on battery life. Don’t be that android developer!
More resources on the topic:
If so, we hope you find this information useful. We will be sharing more insights from last weeks Lunch n Learn soon. We’d also like to let you know that we’re hiring android developers in NYC and LA. Please contact us if you’re interested, we’re always looking for talented Android engineers.
Filed under: Product Engineering | Topics: android app developer, android app developers, android apps developer, android developers