Prefix header with better releasing, freeing and logging


/ Published in: Objective C
Save to your folder(s)

This prefix header adds `SXRelease()`, `SXFree()` and `SXLog()` which can be used instead of `-[ release]`, `free()` and `NSLog()`. In order to use `SXLog()`, you must have DEBUG defined somewhere, such as in the build settings of the debug configuration.

Please note that the `while(0){}` is to prevent errors where a single `;` is not permitted. The optimizer will remove this from the assembly code.

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.