Fix memory leaks in the operation queue

Objects removed from the operation queue must be deleted.