Skip navigation.
 
mlRe: compression of NSData... how to?
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

Related mailsAuthorDate
mlcompression of NSData... how to? Benjámin Salánki Aug 28, 20:35
mlRe: compression of NSData... how to? I. Savant Aug 28, 20:40
mlRe: compression of NSData... how to? Fredrik Olsson Aug 29, 12:01
mlRe: compression of NSData... how to? Benjámin Salánki Aug 29, 15:55
mlRe: compression of NSData... how to? Andrew Merenbach Aug 29, 16:46
mlRe: compression of NSData... how to? Fredrik Olsson Aug 29, 18:14