Fix retain cycle between CDTQIndexManager and CDTDatastore
How
Make a weak reference to the associated object from the CDTDatastore to the CDTQIndexManager. Because it isn't reference counted, the CDTQIndexManager instance dealloc is correctly called (it didn't before because its reference count never reached 0), at which point the reference is cleared.
What
Fix retain cycle between
CDTQIndexManager
andCDTDatastore
How
Make a weak reference to the associated object from the
CDTDatastore
to theCDTQIndexManager
. Because it isn't reference counted, theCDTQIndexManager
instancedealloc
is correctly called (it didn't before because its reference count never reached 0), at which point the reference is cleared.Testing
See added test class
CDTQLifecycleTests
Issues
Fixes #426