QUESTION:
How do I test for a memory leak on Android?
ANSWER:
To test for a leak on Android, you’d basically need to create and destroy a stream repeatedly in the testbed. The basic publish/subscribe examples shouldn’t be making leaks on the app level, so a leak would have to come from either the SDK or the debugger.
Use the memory profile tool that Android has in its debugger. After the destruction of the second stream, if the memory is not going back to the place it dropped back to after the first stream, there is probably a leak.