Show code.

And I highly doubt that a DLL leaving threads around is making your program crash at all. It sounds entirely unrelated.