Message-ID: <358EFF0A.3800AC93@ipass.net> From: Terry MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: Deleting mem allocated to dynamic array? References: <6mmd9s$o7f AT bgtnsc03 DOT worldnet DOT att DOT net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 23 Date: Tue, 23 Jun 1998 01:09:25 GMT NNTP-Posting-Host: ts2-102-ppp.ipass.net NNTP-Posting-Date: Mon, 22 Jun 1998 21:09:25 EDT Organization: iPass.Net To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Jeff W. wrote: > > I declared an array like this: > > MapStruct **Tiles > > and allocated memory to it like this: > > Tiles = new MapStruct *[XSize]; > for (int i = 0; i < XSize; i++) > Tiles[i] = new MapStruct[YSize]; > > XSize and YSize being the width and height of the map. My question > is, how do I delete the memory I allocated to this array? Thanks. > Should be something like: for (i=0;i