On Wed, 19 May 1999, G. Adam Stanislav wrote:
> It should be the constructor that allocates the memory; the
> destructor that frees it. That way you could rely on having exactly the
> amount of memory needed for each class no matter what version of the class
> library you use.

Allowing the constructor to allocate the memory would certainly be
an idea to consider if you were designing a new language, but it
would have a lot of ramifications.  You would essentially have to
add a layer of indirection throughout the language.  It would be
hard to consider it an extension of C, as originally intended.

I actually would have preferred that they just designed a completely
new language, but in that case, it probably would not have become
popular.



To Unsubscribe: send mail to [email protected]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to