NN deletion

fixed a memory leak