title: C++ object created with new, destroyed with free(); How bad is this?
body: <p>I am working on modifying a relatively large C++ program, where unfortunately it is not always clear whether someone before me used C or C++ syntax (this is in the electrical engineering department at a university, and we EEs are always tempted to use C for everything, and unfortunately in this case, people can actually get away with it).</p>
  
  <p>However, if someone creates an object:</p>
  
  <p><code>Packet* thePacket = new Packet();</code></p>
  
  <p>Does it matter whether it is destroyed with <code>delete thePacket;</code> or <code>free(thePacket);</code> ?</p>
  
  <p>I realize that delete calls the destructor while free() does not, but Packet does not have a destructor. I am having a terrible time stuck in a memory management swamp here and I'm thinking this may be one of the many problems.</p>