|
From: Melchior F. <mf...@kd...> - 2003-08-04 13:51:03
|
* Zeljko Vrba -- Monday 04 August 2003 15:36: > On Mon, Aug 04, 2003 at 02:39:15PM +0200, Melchior FRANZ wrote: > > 1209: void* pData = new unsigned char[embeddedItem.iDataSize]; > > ... > > 1217: delete[] pData; > You can't use either delete nor delete[] on void* since the compiler must > know the exact type in order to call destructor for the object(s) Well, the compiler does very well know the type. It was the one who allocated it, remember? :-} I wasn't sure about this, and Stroustrup didn't tell me. > So valgrind is not wrong, your code is. It isn't =my= code. I'm just debugging someone else's. m. PS: Please don't CC to me. I'm subscribed! |