apptentive/apptentive-ios — pull request #68 by tyork (2013-11-14 17:07:52+00:00)
Title: Fix double alloc of persistent store coordinator

*Possible fix for an apparent leak in ATDataManager*

ATDataManager lazily allocates a persistent store coordinator inside a try/catch harness, but the code path followed where no exception is thrown repeats the allocation and assigns it to the var, causing a leak.

The leak shows up in Instruments on the first call to -\[ATConnect setApiKey:@""\] (or anything else that triggers instantiation of the lazy ivar).