• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: compression of NSData... how to?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: compression of NSData... how to?


  • Subject: Re: compression of NSData... how to?
  • From: Fredrik Olsson <email@hidden>
  • Date: Tue, 29 Aug 2006 18:14:31 +0200

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
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >compression of NSData... how to? (From: Benjámin Salánki <email@hidden>)
 >Re: compression of NSData... how to? (From: Fredrik Olsson <email@hidden>)
 >Re: compression of NSData... how to? (From: Andrew Merenbach <email@hidden>)

  • Prev by Date: Re: Accessor method styles
  • Next by Date: Re: Undocumented AB property 'com.apple.speech.ABSpeakable'?
  • Previous by thread: Re: compression of NSData... how to?
  • Next by thread: sprite video tracking
  • Index(es):
    • Date
    • Thread