refs #4 Fix memory leak.