0

Whether system.gc will avoid android's out of memory exception for bitmap?

2
  • No, it won't. A gc is done automatically if memory is low. Btw, this problem has been discussed many times. If you have this problem in a debugger only, it's a known problem with memory leaks through exceptions. If not, then you're leaking bitmaps, or using too large bitmaps. Commented Dec 31, 2010 at 10:14
  • i have found that System.gc() brings improvement with rather big bitmaps but you can not rely on it. Commented Dec 31, 2010 at 13:00

1 Answer 1

1

System.gc() is just an request to jvm to execute gc, you cannot 100% be sure that it will get executed upon System.gc() invocation .

See Also :

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.