FROM : Alex Curylo
DATE : Sun Apr 13 22:35:37 2008
On 13-Apr-08, at 1:06 PM, Greg Titus wrote:
> The big difference is that in Objective-C, trying to send a message
> to nil results in a no-op instead of an access violation, so your
> defensive C++ practice is actually going to tend to mask those same
> errors in Objective-C and make them harder to track down.
*smacks forehead*
Yeah, now that I actually think about it, that would be the effect,
wouldn't it. Just hadn't made the connection up 'til now, somehow.
Thank you.
OK, then, what would an equivalently useful value to set a released
Objective-C object pointer/ivar to in order to cause any subsequent
access of it to stop the program immediately? 0xDEADBEEF perhaps?
--
Alex Curylo -- <email_removed> -- http://www.alexcurylo.com/
Programming is like sex...
One mistake and you support it the rest of your life.
DATE : Sun Apr 13 22:35:37 2008
On 13-Apr-08, at 1:06 PM, Greg Titus wrote:
> The big difference is that in Objective-C, trying to send a message
> to nil results in a no-op instead of an access violation, so your
> defensive C++ practice is actually going to tend to mask those same
> errors in Objective-C and make them harder to track down.
*smacks forehead*
Yeah, now that I actually think about it, that would be the effect,
wouldn't it. Just hadn't made the connection up 'til now, somehow.
Thank you.
OK, then, what would an equivalently useful value to set a released
Objective-C object pointer/ivar to in order to cause any subsequent
access of it to stop the program immediately? 0xDEADBEEF perhaps?
--
Alex Curylo -- <email_removed> -- http://www.alexcurylo.com/
Programming is like sex...
One mistake and you support it the rest of your life.
| Related mails | Author | Date |
|---|---|---|
| Alex Curylo | Apr 13, 22:35 | |
| Greg Titus | Apr 13, 23:15 | |
| Alex Curylo | Apr 13, 23:33 | |
| Bill Bumgarner | Apr 13, 23:48 | |
| Michael Ash | Apr 14, 00:35 |






Cocoa mail archive

