In an android game should you allocate memory for resources in the ui thread or game thread
<p>I asked a lead in to this question <a href="http://stackoverflow.com/questions/14472124/in-android-can-you-load-resources-outside-the-ui-thread">here</a>. I want to know if it is recommended to read the android resources (in the res) folder on the ui-thread or on the game thread for a simple game (based off the lunar lander sample). I see in lunar lander that they allocate resources before starting the game loop. However that doesn't scale up very well if there are lots of resources. The answer to my previous question says that it is ok to read resources like bitmaps on the background thread. Now I want to know if this is the correct way to do things.</p>

<p>An alternate architecture would be to post a Runnable to the ui-thread from time to time and allocate resources then.</p>

<p>Does garbage collection come into play? I wasn't sure which thread GC runs on. But my guess is that it runs on the thread on which the object was allocated.</p>
