4 Replies - 4570 Views - Last Post: 16 August 2012 - 11:37 PM Rate Topic: -----

#1 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Avoiding Memory Leaks | Android Developers

Post icon  Posted 25 June 2011 - 08:39 AM

http://developer.and...mory-leaks.html

Memory leaks aren't something that you would normally expect in an Android application with a garbage collector. But, with the way that the Android lifecycle works, it is unfortunately very easy to have memory leaks. This article describes how they happen and how to prevent them. Thoughts?

Is This A Good Question/Topic? 0
  • +

Replies To: Avoiding Memory Leaks | Android Developers

#2 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Avoiding Memory Leaks | Android Developers

Posted 25 June 2011 - 11:07 AM

i don't understand how the memory leak is caused. no references are lost are they, the JVM makes sure of that. so how is a memory leak caused?
Was This Post Helpful? 0
  • +
  • -

#3 Dogstopper  Icon User is offline

  • The Ninjaducky
  • member icon



Reputation: 2871
  • View blog
  • Posts: 11,026
  • Joined: 15-July 08

Re: Avoiding Memory Leaks | Android Developers

Posted 26 June 2011 - 03:46 PM

Because the original Context is saved statically, so that every time a new Context is created, an entire set of data is still allocated (by that static reference), even though another set is created....When compounded multiple times, it is bad....
Was This Post Helpful? 0
  • +
  • -

#4 ishkabible  Icon User is offline

  • spelling expret
  • member icon




Reputation: 1622
  • View blog
  • Posts: 5,709
  • Joined: 03-August 09

Re: Avoiding Memory Leaks | Android Developers

Posted 26 June 2011 - 04:54 PM

but how dose that translate to a memory leak? either there is something like a heap overflow or im not understanding this.
Was This Post Helpful? 0
  • +
  • -

#5 Nick johnson  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 15
  • Joined: 20-June 12

Re: Avoiding Memory Leaks | Android Developers

Posted 16 August 2012 - 11:37 PM

Even, I m not pretty clear. Is it like FIFO i.e. first in first out.
The memory comes first will be go out if the memory exceeded than the space provided.
or is it a random memory loss?????
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1