From 1234854771811069312
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2847ea2daacb5072
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-04-16 21:07:04 PST
Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: llewelly.at@xmission.dot.com (llewelly)
Newsgroups: comp.std.c++
Subject: Re: Proposal: free() and delete/delete[] compatibility
Date: Sat, 17 Apr 2004 04:07:03 +0000 (UTC)
Organization: The Illusory Sorting Algorithm
Lines: 29
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <86r7unil26.fsf@Zorthluthik.local.bar>
References: <c5pk7v$so3$1@ulysses.noc.ntua.gr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: mail2news.demon.co.uk 1082174823 7558 10.0.0.1 (17 Apr 2004 04:07:03 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Sat, 17 Apr 2004 04:07:03 +0000 (UTC)
X-Received: from mulga.cs.mu.oz.au ([128.250.1.22])
	by news.demon.co.uk with esmtp (Exim 4.12)
	id 1BEh6c-0001xl-00
	for mail2news@news.news.demon.net; Sat, 17 Apr 2004 04:07:02 +0000
X-Received: from mulga.cs.mu.OZ.AU (localhost [127.0.0.1]) by mulga.cs.mu.OZ.AU with ESMTP
	id i3H470i2017331; Sat, 17 Apr 2004 14:07:00 +1000 (EST)
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i3H470WP017322;
	Sat, 17 Apr 2004 14:07:00 +1000 (EST)
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
X-Path: comp-std-cpp-robomod!not-for-mail
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Delivered-To: std-c++@ucar.edu
X-Newsgroups: comp.std.c++
X-NNTP-Posting-Date: Fri, 16 Apr 2004 23:01:54 +0000 (UTC)
X-User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3.50 (berkeley-unix)
X-Cancel-Lock: sha1:HZeli3eu6M4J2N/swfLbklgCCXU=
X-SA-Exim-Mail-From: news@xmission.com
X-SA-Exim-Version: 3.1 (built Wed Aug 20 09:38:54 PDT 2003)
X-SA-Exim-Scanned: Yes
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.60-mulga_r1 (1.212-2003-09-23-exp) on 
	mulga.cs.mu.OZ.AU
X-Spam-Status: No, hits=0.1 required=5.2 tests=AWL autolearn=no 
	version=2.60-mulga_r1
Xref: archiver1.google.com comp.std.c++:1721

ivr@guesswh.at.emails.ru ("Ioannis Vranos") writes:

> Proposal: A guarantee in the standard that if you call free() upon objects
> created by new/new[] ,and a call of delete/delete[] on objects created by
> malloc()/calloc()/realloc() is safe.
>
> I am not talking about the constructors issue where they are not called in
> the case of malloc() family, just the interchange ability between free() and
> the delete family.

What about the destructors issue?

struct foo
{
  ~foo(){std::cout << "Hi, I am a destructor." << std::endl;}
};

int main()
{
  foo* f= new foo;
  free(f); //Should foo::~foo() be called here?
}

---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html                       ]



