I see two possibilities (there may well be more).
The first (most likely) is true of all Java objects: just because you set the reference to null
doesn't automatically mean that the object behind it will be garbage-collected.
If a SoundPool
object itself contains a reference to the two thread objects, none of the three will necessarily be GC'ed until space is required (although that depends, of course, on how aggressive your collector is).
The second (less likely) is that Android may be smart enough to cache thread (or even SoundPool
) objects in case they need to be used again. They may nave done this as a performance optimisation if object creation is more expensive than object re-cycling.
In that case, they would still have a reference to the objects somewhere in a cache and they wouldn't be considered eligible for garbage collection.