home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / sys / mac / programm / 20759 < prev    next >
Encoding:
Internet Message Format  |  1993-01-06  |  1.6 KB

  1. Xref: sparky comp.sys.mac.programmer:20759 comp.lang.c++:18737
  2. Path: sparky!uunet!spool.mu.edu!sol.ctr.columbia.edu!eff!ssd.intel.com!ogicse!reed!bowman
  3. From: bowman@reed.edu (BoBolicious)
  4. Newsgroups: comp.sys.mac.programmer,comp.lang.c++
  5. Subject: Re: MPW C++: Problems with new and delete?
  6. Message-ID: <1993Jan6.035034.23163@reed.edu>
  7. Date: 6 Jan 93 03:50:34 GMT
  8. Article-I.D.: reed.1993Jan6.035034.23163
  9. References: <01050014.muu4n1@blanc.north.de>
  10. Organization: Reed College, Portland, OR
  11. Lines: 22
  12.  
  13. In article <01050014.muu4n1@blanc.north.de> jochen@blanc.north.de (Jochen Meyer) writes:
  14. >I realize that in best case it is hard to diagnose the error due to
  15. >this description. But has anyone else encountered some similar problem
  16. >with new and delete? What was the error in her/his case? Does anyone
  17. >know some workaround? Or does somebody feel helpful enough to look
  18. >through my class gr_varray (less than 100 lines, I would cheerfully
  19. >mail you the source ;-) ).
  20.  
  21. I would *highly* recommend, for starters, that your classes inherit from
  22. PtrObject if they're pointer-based, which it sounds like they are.
  23. The PtrObject code, as well as a great article about pointer-based objects 
  24. on the Mac, was in _develop_ awhile ago.  You might also try turning on heap 
  25. scrambling in MacsBug, too; it's good for making memory problems go sour 
  26. quickly.
  27.  
  28. Other than that, don't know what to tell you.
  29.  
  30. good luck,
  31. bobo              In seeking the unattainable,
  32. bowman@reed.edu            simplicity only gets in the way.
  33. "On Monday, numbers floated everywhere, and the world was full of 
  34. approximations."  -- Spencer Heinz, _The Oregonian_, 1/5/93
  35.