Hello !

 Okay, it seems I have the solution, thanks for the MAT:)
So, as I said I have a lot of LinearLayout class, which are represents
the screens on a lot of times in the app. These classes are have had a
lot of variable , so I had make them clear and null:
I had overrided the removeAllViews of the methods and I had make
everthing to null.
In may times the Linearlayouts had contained arraylist which where
contained another views and another layouts. So I had iterated over
the hole list and called removeAllViews (again overrided by be and
clear the variables and call super.removeallViews) to views and set
them to null. After it make the list clear and set it to null.

 So, I had overried the removeAllViews and the onDestory methods and
clear all datastructure and set everthing to null, furthermore I had
use the AndroidManifest.xml : in some activities I had use the
android:noHistory="true" tag.

 Thanks for your assists , Karoly

On szept. 5, 13:42, Praveen Raj <praveenraj1...@gmail.com> wrote:
> Your problem seems like you are leaking the context to drawble
> objects.
> or you might have used implicit reference to non static inner classes.
>
> http://developer.android.com/resources/articles/avoiding-memory-leaks...
>
> Since you have used lot of linear layout and bitmaps, Most probably
> they are the culprits.
> look for static reference of drawable objects which you are attching
> to views.
>
> On Sep 5, 4:05 pm, KárolyHolczhauser<holczhau...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Hello girls and boys!
>
> >  I'm going to describe my problem as short as I can and would like to
> > give a thanks for any advice, tips and so on :)
>
> > So, I had wrote an really complex News reader application which one is
> > able to:
> > -read news and articles
> > -save and load them
> > -able to save galleries and load them
> > -able to download online mp4 video files and play them to the user
>
> > My problem is the following: don't have enoughmemory:) Seriously,
> > when the I use the program long time ago, watching some video and
> > articles I got an out ofmemoryerror. Sometimes it is an
> > "java.lang.OutOfMemoryError: bitmap size exceeds VM budget" sometimes
> > it is just an "out ofmemory, vm don't allow to alloc xy byte".
>
> > I had tried a lot of thing to make memories free:
> > - clear the cache on the sdcard
> > - disable webviews cache (I'm using webviews to display articles)
> > -catch the OutOfMemoryError and call System and Runtime gc
>
> > None of above was help to me. I haven't got any another idea, so had
> > started to use MAT (MemoryAnalyser Tool) and I had seen there two
> > types of object witch are the biggestmemorycustromers:
> > android.webkit.webHistortyItem and a Linearlayout.
>
> > I don't use webHistorty in the app, only webviews, but I had set the
> > usercache=false . How can I make webHistortyItem clear?
> > Linearlayout ? Of course I'm using a lot, but I have no idea where I'm
> > forget to make it null. How can I find it? Are the Linear-layout and
> > the Bitmaps using the samememoryor they are getting to store in
> > absolutely independent area of it ?
>
> > is anybody have any idea about it? How should I makememoryfree?
>
> >  Thank you , Karoly

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

Reply via email to