• ### Announcements

#### Archived

This topic is now archived and is closed to further replies.

# what's the diff between delete and delete[]?

## Recommended Posts

thuned    122
char *Dib = new char[Size*8]; i allocate memory using the above code. from what i know, i would simply call delete [] DibA to delete DibA. but this is what i do with it:
if (GetDib(&Size, (long*)(Dib+Size*i)))
{
m_Frames = (Dib+Size*i);
}

this code is in a for-loop with i going from 0 to 8, [0,8). and m_Frames is a long m_Frames[8]. so each loop i fill part of the array and i make m_Frames point to the "current index". how do i delete this? delete [] m_Frames[0], delete [] m_Frames, or delete m_Frames[0]. i think it should be delete [] m_Frames[0] but i''m not sure.