Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!lavaca.uh.edu!uhnix1!moray!urchin!f506.n106.z1.fidonet.org!Roy.Browning From: Roy.Browning@f506.n106.z1.fidonet.org (Roy Browning) Newsgroups: comp.lang.c++ Subject: Re: lint++ -> really "AutoCodeReview" -- Ideas requested. Message-ID: <5867.2587A9F2@urchin.fidonet.org> Date: 14 Dec 89 05:35:34 GMT Sender: ufgate@urchin.fidonet.org (newsout1.26) Organization: FidoNet node 1:106/506 - Fulcrum's Edge, Spring TX Lines: 38 > From: rdr@mdavcr.UUCP (Randolph Roesler) > Date: 12 Dec 89 21:51:32 GMT > Organization: MacDonald Dettwiler, Richmond, B.C., Canada > Message-ID: <701@acrux.mdavcr.UUCP> > Newsgroups: comp.lang.c++ Roland: What I so badly related in the previous message is that I find the syntax listed below sufficient for deallocating character arrays. foo() { char* string = new char[number of characters]; ..... delete string; } However the syntax below is what is suggested by Lippman for an array of pointers to objects. The String destructor is invoked for each of the "size" elements of tbl2. foo() { String tbl[ size ]; String *tbl2 = new String[ size ]; ..... while (cin >> tbl[i]); .... delete [ size ] tbl2; } I mistakely assumed that your use of "new" was to return an array of object pointers rather than an array of characters, my mistake. Roy Browning