title: Is it safe to delete a void pointer?
body: <p>Suppose I have the following code:</p>
  
  <pre><code>void* my_alloc (size_t size)
  {
     return new char [size];
  }
  
  void my_free (void* ptr)
  {
     delete [] ptr;
  }
  </code></pre>
  
  <p>Is this safe?  Or must <code>ptr</code> be cast to <code>char*</code> prior to deletion?</p>