I was conducting today interview with one of the candidates. I asked pretty common question: how to add to Android application possibility of playing music constantly, even when activity is destroyed when phone orientations changed. Expected answer was: create Service responsible for playing music. Instead of that candidate suggested to create some singleton in application.
Is this also a correct answer? I think it should be working - Singleton class will be load to memory and will stay in memory forever; my colleague suggest this singleton will be destroy with destroyed activity, because there won't be any reference any longer.