Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting Objective-C++ to work



I wrote:
| In addition, it's very much *not* safe to pass C++ objects to
| Objective-C methods, or to have an Objective-C method return a C++
| object. The object is copied to or from the method using a bitwise
| copy; the class's copy constructor isn't invoked, nor is the class's
| destructor called for the copy.

James Mastro wrote:
| This scared me, so I looked over my code to see if I was sending a C++
| object in by value instead of by reference or pointer. In only two cases
| I was. But the copy constructor was being called fine. I also had a C++
| object returned a few times by an Objective C method to a C++ caller,
| and that was working fine. What am I missing? This is with GCC 3.1 on
| the ancient April 2002 dev tools.

They may well have fixed things since I checked. I don't recall when that was, but that very problem bit me at one point. If it's no longer a problem, I'm glad to hear it.

Glen Fisher
_______________________________________________
projectbuilder-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/projectbuilder-users
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: getting Objective-C++ to work (From: James Mastro <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.