I know that System.gc() is needless and discouraged, and I don't try
to suggest otherwise, but the point is that it shouldn't cause issues
either (i.e. it should be useless at most).

If I add the following code to my Activity.onPause(), then my
application will be slow after the second start of the activity:

if (isFinishing()) {
    System.gc();
}

I.e. the framerate in my GLSurfaceView will be reduced by 50%. If I
remove the System.gc() call, everything is totally fine, no matter how
many times I start the activity again (i.e. start it again after it
was finished()).

The relevant source codes here:
http://stackoverflow.com/questions/11601914/system-gc-causing-slowdown-from-the-second-start-of-activity

Please help! GC is discouraged but shouldn't mess up the View/Layout
destroying system of Android.

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

Reply via email to