First, let me say that this is just a very simple sample application to illustrate the problem. My real application is far more complex, but exhibits this same behavior.
What I need to be able to do is to be able to destroy a given page and then re-create it later. There are several reasons for this, but one of the main ones is that I want to free up the memory of a page which is no longer being actively used. Then when the user loads that page again, I simply re-create it. In Java, of course, there is really no way (that I know of) to free objects, you simply stop referring to them and the the garbage collector magically disposes of them at it's leisure. The problem is that it is simply NOT doing that for my GListView objects. I realize that this application doesn't represent something that you might actually do, but the fact is that if you take this program and run it, the GListView objects are NEVER freed, causing a memory leak. This is what I am trying to address. If I can understand why this is happening in this simple case, I might be able to figure out how to fix it in my actual program. Thanks. On Oct 22, 1:26 am, Doug <beafd...@gmail.com> wrote: > On Oct 21, 9:29 pm, John Gaby <jg...@gabysoft.com> wrote: > > > There cannot be this kind of leak in general can there? > > No, there cannot. > > You strategy looks foreign to me. Can you explain in english what > you're trying to do and the strategy you're using to implement it? > Why are you calling your CreateLayout twice in onCreate? And even > worse, why are you calling it at all in an your onClick handler? > > Doug -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en