www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/05/20/08:18:55

From: eyal DOT ben-david AT aks DOT com
To: p6inf700 AT maya DOT cicrp DOT jussieu DOT fr
cc: djgpp AT delorie DOT com
Message-ID: <C225649D.0042D261.00@aks.com>
Date: Tue, 20 May 1997 15:17:36 +0300
Subject: Re: new and malloc
Mime-Version: 1.0



Hello !


>   Are NEW and MALLOC compatible?

Never assume that.

some inplementations of C++ implement  'new'  by 'malloc' but generally
if you want to write portable code do not mix them.

it is possible to allocate buffer X with malloc and buffer Y with new
but  then you must release X with 'free' and 'Y' with 'delete'.

eyal.



- Raw text -


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