delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2002/03/11/10:45:11

X-Authentication-Warning: delorie.com: mailnull set sender to djgpp-bounces using -f
Message-ID: <3C8CD04E.5050105@vif.com>
From: Sahab Yazdani <sahaby AT vif DOT com>
Organization: PheonixSoft Interactive
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.9+) Gecko/20020307
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: comp.os.msdos.djgpp
Subject: new/malloc and delete/free
Cache-Post-Path: www.vif.com!unknown AT ip216-239-69-198 DOT vif DOT net
X-Cache: nntpcache 2.4.0b4 (see http://www.nntpcache.org/)
Lines: 19
NNTP-Posting-Date: Mon, 11 Mar 2002 09:43:52 CST
X-Trace: sv3-1zyDIGgSmLHWWvQRUur6EhNfNhlmaAXwc27eEgDafXcbJqEjdwq2Qys2pEOGCNml/+i7Fts4KpXUIz3!d9q7+0GeMsyzRcoCq5iSpKSTosaX+osXJKkGygooV6GWWUe2Wc4mOYE=
X-Complaints-To: abuse AT GigaNews DOT Com
X-DMCA-Notifications: http://www.giganews.com/info/dmca.html
X-Abuse-Info: Please be sure to forward a copy of ALL headers
X-Abuse-Info: Otherwise we will be unable to process your complaint properly
Date: Mon, 11 Mar 2002 15:43:52 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

okay i've been using both c/c++ for a while, but this question just 
occured to me now,  what exactly is the difference between new and 
malloc and delete and free.

the book that I have on C++ says that new/delete operate on the heap. so 
what exactly is a heap?  is it just RAM? and what difference does that 
have from C's malloc/free combo?

and finally, is there a reason why I should use one combo over the other??

thanks for any help.
-- 
**************************************************************
* Sahab Yazdani * "Lisa, in this house we obey the laws of   *
* Thornhill S.S * thermodynamics!" - Homer Simpson           *
**************************************************************
* http://pheonixsoft.virtualave.net/                    * :) *
**************************************************************

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019