Android Developer Tips: Never Trust the Garbage Collector (at least when it comes to Bitmaps)

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.”

Never Trust the Garbage Collector (at least when it comes to Bitmaps)

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:

Are you an Android App Developer?

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

B2B Distribution Technology

Sign up for our weekly newsletter covering B2B technology innovation

Top Posts

  • B2B Chemical Marketplaces and Tech Startups: Landscape and State of the Industry

    Read more

  • Platform vs. Linear: Business Models 101

    Read more

  • Amazon Business – 2020 Report

    Read more

  • Platform Business Model – Definition | What is it? | Explanation

    Read more

  • The Value of Digital Transformation: How Investors Evaluate “Tech”

    Read more