title: How to enable NSDebugEnabled/NSEnableAutoreleasePool on iPhone
body: <p>There are environment variables you can set to help debug memory issues on the Mac, but how do you set the environment variables or enable these flags described in NSDebug.h for iPhone development? </p>
  
  <pre><code>NAME OF ENV. VARIABLE               DEFAULT    SET TO...
  NSDebugEnabled                        NO       "YES"
  NSZombieEnabled                       NO       "YES"
  NSDeallocateZombies                   NO       "YES"
  NSHangOnUncaughtException             NO       "YES"
  
  NSEnableAutoreleasePool              YES       "NO"
  NSAutoreleaseFreedObjectCheckEnabled  NO       "YES"
  NSAutoreleaseHighWaterMark             0       non-negative integer
  NSAutoreleaseHighWaterResolution       0       non-negative integer
  </code></pre>
  
  <p>Here is a related article on how to do it for general Mac development I guess.  Maybe it's the same way for iPhone, but since I'm new to the Mac, how are theses environment variables picked up by the simulator?</p>
  
  <p><a href="http://www.cocoabuilder.com/archive/message/cocoa/2003/7/15/90466" rel="nofollow noreferrer">http://www.cocoabuilder.com/archive/message/cocoa/2003/7/15/90466</a></p>