realm/realm-cocoa — pull request #765 by kneth (2014-08-11 13:48:18+00:00)
Title: Using instance of RLMRealm in write transactions

In release mode, write transactions must be performed using an instance of RLMRealm.

The unit tests performed within Xcode are executed in debug mode while `sh build.sh test` will execute in release mode. Apparently, `[RLMRealm.defaultRealm beginWriteTransaction]` will - in release mode - do a commit while the write transaction will remain open in debug mode. I guess that the Objective C runtime will deallocate objects earlier in release mode, and an auto commit is performed too early.

@alazier @tgoyne