From -1434594328227011057
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,2847ea2daacb5072
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 2004-04-21 22:12:32 PST
Path: archiver1.google.com!news1.google.com!news.glorb.com!newsrout1.ntli.net!news-in.ntli.net!kibo.news.demon.net!mutlu.news.demon.net!demon!mail2news.demon.co.uk!devnull
From: ahp6@email.byu.edu ("Adam H. Peterson")
Newsgroups: comp.std.c++
Subject: Re: Proposal: free() and delete/delete[] compatibility
Date: Thu, 22 Apr 2004 05:12:31 +0000 (UTC)
Organization: Brigham Young University
Lines: 19
Approved: fjh@cs.mu.oz.au (Fergus Henderson , moderator of comp.std.c++)
Message-ID: <c67412$4jig$1@acs2.byu.edu>
References: <c5pk7v$so3$1@ulysses.noc.ntua.gr>
 <c5pv1d$1jrr$1@ulysses.noc.ntua.gr>
 <56918018qlgi7pium562mel08eeoh9vjeb@4ax.com>
 <c5s2ff$7oc$1@ulysses.noc.ntua.gr>
 <8b42afac.0404200952.1d7f10cf@posting.google.com>
 <c64bjo$i73$1@ulysses.noc.ntua.gr> <pan.2004.04.21.08.39.46.748697@knm.org.pl>
 <c663fu$1vi0$1@ulysses.noc.ntua.gr>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: mail2news.demon.co.uk 1082610751 28074 10.0.0.1 (22 Apr 2004 05:12:31 GMT)
X-Complaints-To: abuse@demon.net
NNTP-Posting-Date: Thu, 22 Apr 2004 05:12:31 +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 1BGWVi-0007Ie-00
	for mail2news@news.news.demon.net; Thu, 22 Apr 2004 05:12:30 +0000
X-Received: from mulga.cs.mu.OZ.AU (localhost [127.0.0.1]) by mulga.cs.mu.OZ.AU with ESMTP
	id i3M5CRi2013392; Thu, 22 Apr 2004 15:12:27 +1000 (EST)
X-Received: (from fjh@localhost)
	by mulga.cs.mu.OZ.AU (8.12.10+Sun/8.12.9/Submit) id i3M5CR22013382;
	Thu, 22 Apr 2004 15:12:27 +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-Resent-From: news@acs2.byu.edu
X-Delivered-To: std-c++@ucar.edu
X-Resent-Message-Id: <200404220035.i3M0ZmZM010871@mailbox3.ucsd.edu>
X-Resent-date: Wed, 21 Apr 2004 18:35:47 -0600 (MDT)
X-Accept-Language: en-us, en
X-User-Agent: Mozilla Thunderbird 0.5 (X11/20040208)
X-Newsgroups: comp.std.c++
X-Spamscanner: mailbox3.ucsd.edu  (v1.4 Mar 10 2004 15:18:19, 0.0/5.0 2.63)
X-MailScanner: PASSED (v1.2.8 90746 i3M0ZmZM010871 mailbox3.ucsd.edu)
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.0 required=5.2 tests=AWL autolearn=no 
	version=2.60-mulga_r1
Xref: archiver1.google.com comp.std.c++:1836

>>Use malloc & free. It works in both C & C++.
> 
> 
> 
> If we do not know the implementation details of the library (e.g.
> precompiled)?

If it's a C library, it's not using new or new[].

In any event, the library's documentation ought to tell you that type of 
thing.  Otherwise, how do you know when a function returns a pointer 
that it even needs to be deallocated?

---
[ 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                       ]



