Date: Tue, 12 Sep 2000 11:12:52 +0200 From: Egon Eckert To: djgpp AT delorie DOT com Subject: Re: strdup() with delete[] Message-ID: <20000912111252.C30292@chance.cz> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: ; from n_abing@hotmail.com on Mon, Sep 11, 2000 at 06:49:04PM +0000 Reply-To: djgpp AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > delete [] obj_ptr is not obsolete. It is _the_proper_ way to deallocate > an array of objects. What is obsolete is delete [nn] obj_ptr, where > NN would be the number of objects that were allocated for the array. So, is the delete [] form a hint for the compiler "use vector delete, there may be more objects", and the 'simple' delete (without []) is faster (because it doesn't need to find out how many objects there are)? This is the only reason I would accept the existance of these 2 forms. :) You could also clarify me, why '==' has higher precedence than '&' (which I find weird), but this would be totally off-topic.. -- Egon Eckert, Chance, a.s. E-mail: egon AT chance DOT cz