Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!usc!apple!apple.com!chewy From: chewy@apple.com (Paul Snively) Newsgroups: comp.sys.mac.programmer Subject: Re: Multiple Inheritance for HandleObjects in C++ Message-ID: <8940@goofy.Apple.COM> Date: 30 Jun 90 01:37:25 GMT References: <15132@reed.UUCP> Sender: usenet@Apple.COM Organization: Apple Computer, Inc. Lines: 33 In article <15132@reed.UUCP> bowman@reed.UUCP (Eric Bowman) writes: > I've just discovered, to my horror, that you can't create HandleObjects > with multiple base classes in MPW C++. Are there any work arounds for this? > Anyone know why this is the case? Larry Rosenstein and Amanda Walker have already done an excellent job of answering the question Eric poses, but I'd like to point out something else: Since Eric is using HandleObjects, he apparently isn't concerned about Object Pascal compatibility. This means that he's probably concerned about fragmenting the heap, which standard C++ objects, being based on malloc and free, tend to do. Andy Shebanow, a former engineer here in MacDTS, wrote a very good article in "D e v e l o p" describing a class that he created called "PtrObject." The idea was to provide all of the functionality of standard C++ but to use NewPtr and DisposPtr to manage memory instead of malloc and free. Perhaps Eric would benefit from using Andy's PrtObject class. Just a thought... __________________________________________________________________________ Paul Snively Macintosh Developer Technical Support Apple Computer, Inc. chewy@apple.com Just because I work for Apple Computer, Inc. doesn't mean that I believe what they believe, or vice-versa. __________________________________________________________________________