From -611215117402255275
X-Google-Thread: f78e5,a10702d4a7db0a94
X-Google-Attributes: gidf78e5,public
X-Google-Language: ENGLISH,ASCII-7-bit
Path: g2news2.google.com!news4.google.com!news.glorb.com!news.alt.net!comp-std-cpp-robomod!not-for-mail
From: Mathias Gaunard <loufoque@remove.gmail.com>
Newsgroups: comp.std.c++
Subject: Re: Why no size_t to ::operator delete?
Date: Sat, 30 Dec 2006 13:06:42 CST
Organization: Guest of ProXad - France
Lines: 15
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
Message-ID: <45965707$0$309$426a34cc@news.free.fr>
References: <1166953289.859132.240450@i12g2000cwa.googlegroups.com> <memo.20061228090352.2192A@brangdon.cix.compulink.co.uk>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-Trace: 1167480584 news-4.free.fr 309 82.233.64.48:42724
X-Complaints-To: abuse@proxad.net
NNTP-Posting-Date: 30 Dec 2006 13:09:44 MET
Return-Path: <devnull@stump.algebra.com>
X-Authentication-Warning: mulga.csse.unimelb.edu.au: fjh set sender to devnull@stump.algebra.com using -f
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
X-Original-To: std-c++@mailman.ucar.edu
Delivered-To: std-c++@mailman.ucar.edu
User-Agent: Thunderbird 1.5.0.8 (X11/20061115)
X-Virus-Scanned: amavisd-new at ucar.edu
X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au
X-Virus-Scanned: amavisd-new at csse.unimelb.edu.au
Xref: g2news2.google.com comp.std.c++:5202

Dave Harris wrote:

> I'm not sure what you mean here. If you allocate an object as int and 
> delete it as char, you have undefined behaviour, so the memory manager can 
> depend on the user not doing that sort of thing.

However, you can allocate an object as Derived and delete it as Base.
And sizeof(Derived) could be bigger than sizeof(Base).

---
[ 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.comeaucomputing.com/csc/faq.html                      ]



