Foo* set = new Foo[100]; // ... delete [] set;
You don\'t pass the array\'s boundaries to delete[]. But where is that information stor
delete[]
Because the array to be 'deleted' should have been created with a single use of the 'new' operator. The 'new' operation should have put that information on the heap. Otherwise, how would additional uses of new know where the heap ends?