Categories
- Code (3)
- Code Snippets (12)
- git (1)
- Hardware (1)
- News (5)
- Objective-C (6)
- Precompiled (4)
- Programming (1)
- Review (1)
- Swift (9)
- Swift Standard Library (3)
- Tips (3)
- Tutorial (22)
- Uncategorized (3)
- WWDC (1)
-
Recent Posts
Meta
-
Category Archives: Code Snippets
Tip: Ensuring ARC is Enabled at Compile Time.
If you still have legacy code around that is not compiled with Automatic Reference Counting (ARC), accidentally adding some new code that assumes that ARC is enabled can lead to extensive memory leaks. This simple test, placed in a .m … Continue reading
Posted in Code, Code Snippets, Objective-C, Tips
Tagged ARC, Automatic Reference Counting, Memory Management
Leave a comment
Code Snippet: Decompressing a gzipped buffer.
The other day I was working with a web service that gzipped some of its replies. I needed something simple and robust that would gunzip an NSData without writing a file. When a little googling did not turn up a … Continue reading
Posted in Code Snippets
1 Comment
Snippet: Playing a System Sound (ARC Version)
A minor change is needed to the “Playing a System Sound” code snippet. A __bridge modifier has to be added to the CFURLRef cast.