[android-developers] Re: OutOfMemory exception in OnCreate
> You might want to try just tossing a System.gc()
Thanks for your answer, unfortunately, I'm already doing it :
//Try to avoid crashing with outofmemory in the app oncreate
try{
setContentView(R.layout.main);
} catch (Exception e) {
System.gc();
System.runFinalization();
System.gc();
setContentView(R.layout.main);
}
But no dice. It does not happen as much though, so it kind of fixed
it.
I'm going to see in the next few days, if it is always the same device
or framework.
I'll keep you posted.
Yahel
--
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+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home