Doubt regarding deletion of pointers

why delete an array of pointers when the the pointer array isnt deleted i mean after deletion it still exists
in the lecture code sir has deleted the array so
i tried and found out that the array of pointers still exists so the memory isnt freed so whats the significance of doing delete [ ] oldtable ;

please help
i have commented my doubt in testing code
https://ide.codingblocks.com/s/49653

please see line 67 of this class code

thanks in advance

Hi Jai,
The memory is free once the delete operation is called. The compiler just changes the range of the memory as ‘unassigned’ internally, which means another call to new can use that same memory range. The compiler does not wipe it back to 0 everytime something’s deleted because it would reduce performance. Whenever data in that memory would be overwritten, oldtable[2] won’t return the same thing anymore. Hope that resolves your query.