Fixed nasty memory leak in test case.

no more memory leaks seem to occur in WIN32