in reply to threads causing memory leak

This code is called every 30 seconds, and adds up roughly 20 megs of memory at each call. That of course leads to out of memory crashes pretty quickly.

Um, no, the code you showed only gets called once