dPompa Blog

Working with Git

I’ve been researching Git for some time now and started using it full time. I decided to give Git a try after having a lot of pain with SVN. The experience until now has been absolutely amazing! Read the rest of this entry »

Memory Warnings (aka: EXC_BAD_ACCESS)

As an iPhone developer you have to handle low memory situations gracefully and clear as much memory as you can. These can often lead to unexpected crashes if your memory management has a bug somewhere. If you wish to catch these easily then do the following:

  1. Go to your executable settings in Xcode and set the environment variable NSZombieEnabled to YES.

  2. Go to System Preferences > Keyboard > Keyboard Shortcuts and add a shortcut for the iPhone Simulator menu item called “Simulate Memory Warning”. I set mine to command+1.

    Simulate Memory Warning Shortcut

  3. Add a breakpoint (cmd + option + B in Xcode) at “objc_exception_throw”.

Now run your app in the simulator under the debugger, and trigger memory warnings while working your app. Trigger often, at the places your app probably won’t expect them. In fact, try triggering as much as you can.

The shortcut you defined allows you to send the warnings while the mouse operates the app. Since NSZombie throws an exception on each message it receives, you’ll break exactly where you need.

Have fun and good luck! :)

New Support Section

After many hours of work, we now have a new support section at www.dpompa.com/support. It contains answers to the most frequently asked questions we received about Matalot, as well as detailed explanations and tutorials.

The new section should help you find answers quickly, but you should always contact us directly if you need a human at the other side. Our support email remains the same an is support@dpompa.com.