home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / cplus / 12660 < prev    next >
Encoding:
Text File  |  1992-08-20  |  1.1 KB  |  29 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!newsgate.watson.ibm.com!yktnews!admin!!mittle
  3. From: mittle@watson.ibm.com (Josh Mittleman)
  4. Subject: Re: con/destruction of fundamental type
  5. Sender: news@watson.ibm.com (NNTP News Poster)
  6. Message-ID: <1992Aug20.173211.27603@watson.ibm.com>
  7. Date: Thu, 20 Aug 1992 17:32:11 GMT
  8. Disclaimer: This posting represents the poster's views, not necessarily those of IBM
  9. References:  <1992Aug20.161921.11717@ericsson.se>
  10. Nntp-Posting-Host: siena.watson.ibm.com
  11. Organization: IBM T.J. Watson Research Center
  12. Lines: 15
  13.  
  14. Jonas Nygren writes:
  15.  
  16. > I am trying to manage memory allocation, con- and destruction in my own
  17. > code.  I also want these operations to work for struct/classes as well as
  18. > fundamental types, int, char aso. 
  19.  
  20. > How do you do this in C++?
  21.  
  22. Overload ::new().  Memory mangagement is hadled by oeprator new(), not by
  23. the constructor: The constructor simply initialized the blcok of memory
  24. once it has been allocated. 
  25.  
  26. ===========================================================================
  27. Josh Mittleman (mittle@watson.ibm.com)
  28. J2-C28 T.J. Watson Research Center, PO Box 704, Yorktown Heights, NY  10598
  29.