Changed methodology of avoiding memory leak.