use new and delete in view