You might be holding on to the memory allocated even after your app is closed. Check you memory allocations. That should give you a hint.
-Kumar Bibek http://techdroid.kbeanie.com On Oct 5, 9:49 am, caxton <[email protected]> wrote: > HI, > > There is a strange out of memory error issue. > I create a class to parse live streaming, and the class needs buffers > to keep these raw data. > Here are code snippets: > > /* Initial and uninitial buffer in class */ > private final int MAX_BUFFER = 16; > protected byte[][] m_byStreamBuf = null; // Frame buffer > public void InitBuffer() { > m_byStreamBuf = new byte[MAX_BUFFER][]; > m_byStreamBuf[0] = new byte[512*1024]; // for I Frame > for (int i = 1; i < MAX_BUFFER; i++) { > m_byStreamBuf[i] = new byte[256*1024]; // for P frame > } > > } > > public void UninitBuffer { > this.m_byStreamBuf = null; > System.gc(); > > } > > Out of memory error will occur after start and close the application > several times(maybe three or four times actually). > I check that the error occurs on the line which allocates memory. > I have try to call System.gc() when close application every time. > But it seems that the application still allocate too much memory and > do not release all of them. > > Thanks for any suggestion. > > Regards, > Caxton -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

