FROM : Fredrik Olsson
DATE : Tue Aug 29 18:14:31 2006
Andrew Merenbach skrev:
> I've not used NSAssert() much, but might there not be a memory leak if
> it raises an NSInternalInconsistencyException (which, according the
> docs, it does)? Your [compData release] call occurs only after the
> block in which NSAssert() is called.
>
> Perhaps an exception block with @finally would prove useful here?
>
> Besides that (which is possibly moot, anyway, for as I say, I have not
> used NSAssert() much), this is a really useful example to have!
>
I may be wrong, but I am under the assumption that asserts will not be
included in release builds. So I mainly just use them to catch my own
faults, works way better than NSLog or printf.
I got into using asserts when I begun coding D, and loved them. And
there they are not included in release builds, so I kind of assumed it
was a universal law.
// Fredrik Olsson
DATE : Tue Aug 29 18:14:31 2006
Andrew Merenbach skrev:
> I've not used NSAssert() much, but might there not be a memory leak if
> it raises an NSInternalInconsistencyException (which, according the
> docs, it does)? Your [compData release] call occurs only after the
> block in which NSAssert() is called.
>
> Perhaps an exception block with @finally would prove useful here?
>
> Besides that (which is possibly moot, anyway, for as I say, I have not
> used NSAssert() much), this is a really useful example to have!
>
I may be wrong, but I am under the assumption that asserts will not be
included in release builds. So I mainly just use them to catch my own
faults, works way better than NSLog or printf.
I got into using asserts when I begun coding D, and loved them. And
there they are not included in release builds, so I kind of assumed it
was a universal law.
// Fredrik Olsson
| Related mails | Author | Date |
|---|---|---|
| Benjámin Salánki | Aug 28, 20:35 | |
| I. Savant | Aug 28, 20:40 | |
| Fredrik Olsson | Aug 29, 12:01 | |
| Benjámin Salánki | Aug 29, 15:55 | |
| Andrew Merenbach | Aug 29, 16:46 | |
| Fredrik Olsson | Aug 29, 18:14 |






Cocoa mail archive

