Avoid memory leak

Don't hold strong references to threads, as these can prevent threads
being garbage collected properly.
Merge pull request #2 from theospears/avoid-memory-leak

Avoid memory leak