// in XCode 3
1. click project_name to Excutables.
2. click arguments tab.
3. add name and value at environment variable.
- name is [ NSZombieEnabled ]
- value is [ YES ]
you will show log at console when bulid and go.
// in XCode 4
1. Select Product from the menu bar above.
2. Select Edit Scheme menu.
3. when select debug mode, you will show 'Environment Variables' section.
4. add NSZombieEnabled YES in the "Environment Variables" section.
Check it Code.
[sourcecode language="ObjC"]
if(
getenv("NSZombieEnabled") || getenv("NSAutoreleaseFreedObjectCheckEnabled")
) {
NSLog(@"NSZombieEnabled/NSAutoreleaseFreedObjectCheckEnabled enabled!");
}
[/sourcecode]
참고자료 : http://www.cocoadev.com/index.pl?NSZombieEnabled