implemented delete for memory manager