Re: Allocating too much memory kills my App rather than returning NULL
Re: Allocating too much memory kills my App rather than returning NULL
- Subject: Re: Allocating too much memory kills my App rather than returning NULL
- From: Wade Tregaskis <email@hidden>
- Date: Tue, 08 Nov 2011 21:48:13 -0800
> Simple as that, eh? Being able to gracefully handle all out of memory situations to me seems as "simple" as being required to treat every single method / function call as potentially raising an exception, and requiring the developer to add handlers + cleanup code. No existing code (OS or apps) is exceptions safe at every single line of source code. At the very least this would require a complete rewrite / review of every single line of existing source code in both OS and apps, something that seems neither simple nor practical to me.
Another straw man. We could, hypothetically, talk about the probabilities, but neither of us has sufficient data. Like most things in software development, it's up to each individual to decide where the balance is between defensive coding and whatever trade-offs it requires. My aim here has been to persuade anyone listening that this is something they have a meaningful influence over. I hope for my own selfish sake that I've succeeded at least a little, just in case I end up using code written by any of our listeners.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden