Hi All,

Sorry, I have to turn this around.

The problem turned out not to be the static objects at all, though I can't
explain why for a short while, the crash was gone after removing them.

The actual cause is the dictionary definition itself: I used a constant
that is only available for iOS7.0+, while my test kit in use after
upgrading to Xcode 6.1 became an iOS 6.0 device, which I didn't realize at
all (we switch kits among the team every now and then). So the crash
happened for a much simpler reason.

Apologies for the fuss and now I am more confident in ObjC++ safety.

Thank you all again for the help.

Thanks,
Beinan


On Fri, Oct 24, 2014 at 5:10 PM, Glenn L. Austin <gl...@austinsoft.com>
wrote:

> > On Oct 24, 2014, at 11:44 AM, Beinan Li <li.bei...@gmail.com> wrote:
> >
> > BTW, simply changing the offending dictionary syntax to using the old API
> > instead of the literals didn't help.
> > I really had to abandon the singleton idea for the C++ wrapper object.
>
> Static objects -- of any kind -- can lead to hard-to-diagnose problems.
>
> While it's not *necessarily* a bad idea to have objects allocated at
> launch time, it does lead to slower launch times, lack of control over
> initialization (and destruction) order, and often significant increases in
> memory usage at launch time.
>
> --
> Glenn L. Austin, Computer Wizard and Race Car Driver         <><
> <http://www.austinsoft.com>
>
>
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to