Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!apple!autodesk!peb From: peb@Autodesk.COM (Paul Baclaski) Newsgroups: comp.lang.c++ Subject: Re: ``delete[]p'' -- where is the actual size of *p stored? Summary: that depends upon what version of cfront you have Message-ID: <127@autodesk.UUCP> Date: 19 Sep 90 22:05:05 GMT References: <56956@microsoft.UUCP> <1180@fornax.UUCP> Distribution: comp Organization: Autodesk Inc., Sausalito, CA Lines: 17 In article <1180@fornax.UUCP>, miron@fornax.UUCP (Miron Cuperman) writes: > jimad@microsoft.UUCP (Jim ADCOCK) writes: > > >In article cline@sun.soe.clarkson.edu (Marshall Cline) writes: > >> B* p = new D[100]; > >> delete [] p; > ... Therefore the above syntax is correct. > From what I understand, the C++ implementation must save the length of > the array in bytes, and deallocate it accordingly. This is not true of V1.2 of cfront, but is true for 2.1. I am not sure about 2.0. C++ *is* converging on the "right way", but it does take time. Paul E. Baclaski peb@autodesk.com