Over a million developers have joined DZone.

How to Handle Memory Management in Android

· Java Zone

Navigate the Maze of the End-User Experience and pick up this APM Essential guide, brought to you in partnership with CA Technologies

Memory management is a serious issue for Java development. When it comes to Android, though, things are a little different: consequences are limited to your individual app, rather than system-wide catastrophes. That means you might need some different strategies, and this recent article from Joe Mahon at Raizlabs provides a few tips to help you out. Mahon's tips come in the form of lessons - seven in total - such as:

  • Search for memory leaks even when things aren't failing
  • Keep track of your references
  • Be aware that the Android GarbageCollector is clumsy
  • Don't hang on to references to activities

And a few more. For each, Mahon explains what types of issues might arise, and how to fix them. It's a pretty helpful guide to some of the nuances of Android memory management, and Mahon really drives home the importance of the issue, too:

Utilize prayer, lucky rabbit feet, or indomitable willpower in the face of the inevitable flood of negative reviews when you ignore this issue.

Check out Mahon's full article, and also be on the lookout for part 2 sometime soon!

Thrive in the application economy with an APM model that is strategic. Be E.P.I.C. with CA APM.  Brought to you in partnership with CA Technologies.

Topics:

The best of DZone straight to your inbox.

SEE AN EXAMPLE
Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.
Subscribe

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}