[reSIProcate] Should this work?

Thomas Gal ThomasGal at LumenVox.com
Tue Nov 30 16:03:15 CST 2004


I noticed a little oddity, and perhaps it's a compiler particular but in
HeaderFieldValue.hxx we declare:

      const char* mField;

And then constructor:

   mField = new char[mFieldLength];
   memcpy(const_cast<char*>(mField), hfv.mField, mFieldLength); // <- good
reason for casting

BUT in the destructor

     delete[] mField; // <- should this work?

Which I think should be something like:

    delete[]  const_cast<char*>(mField);

No?



Thomas Gal
Lead Protocol Engineer

thomasgal at lumenvox.com
Toll Free: 877-977-0707 Say "Tom Gal"
Phone: 858-707-0707x135
Fax: 858-707-7072

LumenVox LLC 
3615 Kearny Villa Rd #202
San Diego, CA 92123
www.lumenVox.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 4067 bytes
Desc: not available
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20041130/bc52a852/attachment.bin>


More information about the resiprocate-devel mailing list