Quote Originally Posted by King Mir View Post
Wouldn't it be possible to call :perator delete(), assuming that the memory is POD, or has been properly destroyed before hand?
That would be the same thing as calling delete or delete [] - that is what it does "behind the scenes".

Given that it's "undefined", I would agree with the "use malloc/free" advice given above. Or just use a non-void pointer in the first place - it is really very rare that there is a valid reason to create a void * - you may convert something to a void pointer later, but you need to convert the void pointer to something else ANYWAYS to use it for anything [other than generic memory functions, reading/writing to files etc of course].

This is another case where the original poster probably needs to provide a bit more info about what the actual problem - this is a typical "I need help taking the wheelnuts out", when the actual problem is a punctured tyre [and the "right" solution may even be to squirt in some "gunk" to seal and inflate the tyre, rather than put on a spare wheel].

--
Mats