Updated Branches:
  refs/heads/master 9e0bb9358 -> 32585b229

Added TODO note for createAddressBook


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/32585b22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/32585b22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/32585b22

Branch: refs/heads/master
Commit: 32585b22988b769677c147ff55ce5208646e2b33
Parents: 3767d5d
Author: Shazron Abdullah <shaz...@apache.org>
Authored: Tue Oct 23 13:39:10 2012 -0700
Committer: Shazron Abdullah <shaz...@apache.org>
Committed: Tue Oct 23 13:39:10 2012 -0700

----------------------------------------------------------------------
 CordovaLib/Classes/CDVContacts.m |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/32585b22/CordovaLib/Classes/CDVContacts.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVContacts.m b/CordovaLib/Classes/CDVContacts.m
index ed4c112..429e7ec 100644
--- a/CordovaLib/Classes/CDVContacts.m
+++ b/CordovaLib/Classes/CDVContacts.m
@@ -553,9 +553,14 @@
 
 @implementation CDVAddressBookHelper
 
+/**
+ * NOTE: workerBlock is responsible for releasing the addressBook that is 
passed to it
+ */
 - (void)createAddressBook:(CDVAddressBookWorkerBlock)workerBlock
 {
-    // !! caller is responsible for releasing AddressBook!!
+    // TODO: this probably should be reworked - seems like the workerBlock can 
just create and release its own AddressBook,
+    // and also this important warning from 
(http://developer.apple.com/library/ios/#documentation/ContactData/Conceptual/AddressBookProgrammingGuideforiPhone/Chapters/BasicObjects.html):
+    // "Important: Instances of ABAddressBookRef cannot be used by multiple 
threads. Each thread must make its own instance."
     ABAddressBookRef addressBook;
 
 #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 60000

Reply via email to