Memory leak problem with deleteEntries