Mail Archives: djgpp/1998/03/05/06:16:48
Gili wrote:
> Is it possible to use realloc() on memory allocated using NEW?
> Is
> there a C++ equivilent?
No. If you want to use constructors and destructors, then use
new/delete. If you want to allocate memory (only, no constructors or
destructors), and possibly resize blocks, use malloc/realloc/free.
> Also, is it possible to simply write my own
> NEW operator?
Yes; get a good reference book on C++ for information on this.
> If so, what does GCC do, simply reroute the command to
> malloc() and call that instead?
What gcc does or does not do cannot be depended upon beyond what is
indicated in the C++ draft specifications.
--
Erik Max Francis, &tSftDotIotE / mailto:max AT alcyone DOT com
Alcyone Systems / http://www.alcyone.com/max/
San Jose, California, United States / icbm://+37.20.07/-121.53.38
\
"I've got the fever for the / flavor of a cracker"
/ Ice Cube
- Raw text -