ECS-L Home Automation and Security Archives
  learn more | view messages for this month | NetBloc® | terms of use | search

Google
 


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects

Subject:
From:
Date:
Re: [ECS] C++ reallocate ?
Jay Heyl
Wed, 29 Sep 1999 23:21:14 -0700

"new" is really just a fancy way to "malloc".  It can have other
implications if the class of the object being created (or any class from
which it is derived) has a custom constructor, but for simple classes "new"
is literally just a "malloc".  This is certainly not the OOP way, but I'd
suggest sticking with malloc() for buffers or any of the things you are
subsequently realloc()'ing.

  -- Jay

At 06:56 09/29/99 -0700, you wrote:
>To C++ programmers:
>In studying C++, I am looking at replacing my malloc()
>calls with "new", but I can find no description (in
>my C++ book or in MS C++) on how to RE-allocate mem
>(which I use extensively via realloc()).
>How is this handled in C++ ? Thanks.


  subject (prev) or (next) | time (prev) or (next) | author (prev) or (next) | view more subjects




Services provided by [NetBloc]®! NetBloc Solutions Inc.
Terms of use. Indexing software (c) 1999 Lin-De, Inc
.