Path: csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.posted.grandecom!news.posted.grandecom.POSTED!not-for-mail NNTP-Posting-Date: Fri, 13 Jan 2012 11:05:20 -0600 User-Agent: Microsoft-Entourage/12.23.0.091001 Date: Fri, 13 Jan 2012 11:05:19 -0600 Subject: How to free this memory? From: Bint Newsgroups: comp.lang.c++ Message-ID: Thread-Topic: How to free this memory? Thread-Index: AczSFYceGjfE0I+VW0+9tvR92G62RA== Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Lines: 29 X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 216.82.212.181 X-Trace: sv3-IsHc4K/8JBy+XIBopartrtIS1OTCJYutd+bk9S5I+1Kqa9Tg7QUMkgOtG4U+dEu8PGl/PykT6GrG2+i!xhBNUPGS7/du/u3l2k781+jGR2kX/gTRVXtSNspHV/csVUuOK5WUG5sungL9sj4= X-Complaints-To: abuse@grandecom.com X-DMCA-Complaints-To: abuse@grandecom.com X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 1679 Xref: x330-a1.tempe.blueboxinc.net comp.lang.c++:13339 Hello, I am allocating some vertices to pass to a function, and then I want to free the memory. How do I do this? The compiler is giving me warnings when I do it this way: trivertex **vertices; vertices = new trivertex*[2]; vertices[0] = new trivertex[100]; vertices[1] = new trivertex[50]; . . . delete vertices[0]; delete vertices[1]; delete vertices; I get this warning: " 'delete' applied to a pointer-to-array type 'trivertex *' (aka 'double (*)[3]') treated as delete" Thanks! B