I am having a peculiar problem regarding HandlerThreads and Dialog boxes. I create a new HandlerThread object to show a dialog box (this is from a non ui class, using the callers context) and then quit the thread once the dialog box closes.
The thread gets stopped alright, but the object does not get GC'd and the file descriptor count for the process has increased. When I do this repeatedly, the app reaches 1024 open fd's and crashes. Am I missing something or Is this an OS issue?