delorie.com/archives/browse.cgi | search |
From: | Ian Miller <itmiller AT dera DOT gov DOT uk> |
Newsgroups: | comp.os.msdos.djgpp |
Subject: | Re: "delete" and "delete []" operators |
Date: | 09 Jul 1998 18:12:49 +0100 |
Organization: | Defence Evaluation & Research Agency |
Lines: | 21 |
Message-ID: | <873ecbeyni.fsf@hasn.dera.gov.uk> |
References: | <ivglrCA7V$o1Ew74 AT lwithers DOT demon DOT co DOT uk> |
NNTP-Posting-Host: | 146.80.115.106 |
To: | djgpp AT delorie DOT com |
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Laurence Withers <lwithers AT lwithers DOT demon DOT co DOT uk> writes: > If I create an array like this: > > typedef char *cptr; > cptr x; > x = new char[15]; > > Should I then, when I come to free the memory, use: > > delete x; > or > delete [] x; delete [] x; Ian -- Ian Miller, Dorset, UK The views expressed above are those of the writer and do not represent the views, policy, or understanding of any other person or official body.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |