I have bumped into OutOfMemoryErrors because threads are being created and terminating faster than the call stacks are cleaned up. The thread call stacks can't be cleaned up except in a full GC. Of course, creating so many short-lived threads is a problem of the program. It seems programmers think thread pools aren't worth the effort, won't be needed or are for only performance sensitive code. "new Thread" should be flagged as a problem and thread pools should always be used.
Log in to post a comment.