🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #42367

Re: "delete" problem in gcc

#42367
From: Joe Buck
Date: Fri, 15 Dec 1995 00:00
16 lines
1032 bytes
"Andrei B. Konstantinov" <andrei@creighton.edu> writes:
>When I free space with "delete [size] theObject;", g++
>says that I use an "anachronistic" size argument for operator "delete". 
>When I compiled it with just "delete theObject", the memory fault error 
>is generated every time I pass an object of the class that contains 
>theObject as an argument to some function. 

Proper C++ is
	delete [] theObject;

This change happened about six years ago.

This was really a comp.lang.c++ question.

-- 
-- Joe Buck 	<jbuck@synopsys.com>	(not speaking for Synopsys, Inc)
Technical Details
Message-ID: <4asgsj$fn@hermes.synopsys.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <Pine.HPP.3.91.951213154859.27851A-100000@bluejay.creighton.edu>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,4e4f98ae69eaa083
X-Google-Attributes: gid11318c,public
From: jbuck@synopsys.com (Joe Buck)
Subject: Re: "delete" problem in gcc
Date: 1995/12/15
Message-ID: <4asgsj$fn@hermes.synopsys.com>
X-Deja-AN: 121954547
references: <Pine.HPP.3.91.951213154859.27851A-100000@bluejay.creighton.edu>
organization: Synopsys Inc., Mountain View, CA 94043-4033
newsgroups: gnu.gcc.help