It's fine, but you don't need to assign NULL to temp after you delete it. I'm assuming it will go out of scope almost immediately, right? Then anything else you do with the pointer after deleting it is irrelevant.
It only makes sense if the pointer will continue to exist later. For example, if the pointer is a class member, and it's being deleted somewhere other than the destructor.