deleting a void* is a bad idea. delete needs to call the destructor of whatever object it's destroying, and it can't do that if it doesn't know the type.
You probably shouldn't need to do any casting. Just delete whatever it is you're trying to delete normally.