Topic: delete x vs. delete [] x
Author: cmk@control.mining.ubc.ca (chris kushnir)
Date: 27 Jun 1993 22:27:34 GMT Raw View
I was looking through the FAQ the other day and came across the
point of using delete [] for deleting arrays created using new
(Part 8; Q37).
I use BC++ and there is no reference in any of the manuals to
this convention (BC++ manuals).
In fact in the examples they show the creation of arrays using
'name = new type[size]' and the deletetion using 'delete name'
not 'delete [size] name' or 'delete [] name' as suggested in
the FAQ.
BC++ won't accept 'delete [] name' saying it requires a size
for the array, fair enough.
I can't seem to see any difference in using 'delete name' as
opposed to 'delete [size] name'.
Is the FAQ out of date, or does Borland support a non-standard
delete syntax?
---
...cmk ( cmk@hardrock.mining.ubc.ca : Tel. (604) 822-3641 )
Fair ladies - shine upon us like the sun,
Blossom like the flowers around us - be our songs,
Heard in a dream - Make sweet the hour of death,
Smiling upon us as you close our eyes -
Inspire, but do not try to criticise! -- Cyrano de Bergerac
Author: grumpy@cbnewse.cb.att.com (Paul J Lucas)
Date: Mon, 28 Jun 1993 02:49:28 GMT Raw View