• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Objective C++ and ObjC exceptions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objective C++ and ObjC exceptions


  • Subject: Objective C++ and ObjC exceptions
  • From: Kai BrĂ¼ning <email@hidden>
  • Date: Wed, 19 Sep 2007 21:47:43 +0200

Most of the restrictions concerning the mixture of ObjC and C++ I do understand well and consider more or less obvious. But there's one exception concerning exceptions: if an Objective C exception unrolls the stack, it does not clean up C++ objects on that stack, that is their destructors are not called. This is a real bad thing, because it practically disables use of the C++ RAII (resource acquisition is initialization) design pattern in any code which may see Objective C exceptions.

I am aware that there is probably no remedy, but I am so disappointed about this behavior that I hope to receive at least a good reason for it and maybe some hope for change in the future. The not so near future, I am afraid, since I already tested with XCode 3 under Leopard.

Best regards,
Kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Objective C++ and ObjC exceptions
      • From: Scott Ribe <email@hidden>
    • Re: Objective C++ and ObjC exceptions
      • From: Alastair Houghton <email@hidden>
  • Prev by Date: Increasing your app's stack size
  • Next by Date: Re: Increasing your app's stack size
  • Previous by thread: Re: Increasing your app's stack size
  • Next by thread: Re: Objective C++ and ObjC exceptions
  • Index(es):
    • Date
    • Thread