Authored by Justin R. Miller

fixes #308: handle dispatch queues properly with ARC on iOS 6+

@@ -130,7 +130,9 @@ @@ -130,7 +130,9 @@
130 // wait for whole group of fetches (with retries) to finish, then clean up 130 // wait for whole group of fetches (with retries) to finish, then clean up
131 // 131 //
132 dispatch_group_wait(fetchGroup, dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * self.requestTimeoutSeconds)); 132 dispatch_group_wait(fetchGroup, dispatch_time(DISPATCH_TIME_NOW, NSEC_PER_SEC * self.requestTimeoutSeconds));
  133 +#if ! OS_OBJECT_USE_OBJC
133 dispatch_release(fetchGroup); 134 dispatch_release(fetchGroup);
  135 +#endif
134 136
135 // composite the collected images together 137 // composite the collected images together
136 // 138 //
@@ -158,6 +158,10 @@ typedef enum : NSUInteger { @@ -158,6 +158,10 @@ typedef enum : NSUInteger {
158 * Note that you may want to clear the tile cache after changing this value in order to provide a consistent experience. */ 158 * Note that you may want to clear the tile cache after changing this value in order to provide a consistent experience. */
159 @property (nonatomic, assign) RMMapboxSourceQuality imageQuality; 159 @property (nonatomic, assign) RMMapboxSourceQuality imageQuality;
160 160
  161 +#if OS_OBJECT_USE_OBJC
  162 +@property (nonatomic, readonly, strong) dispatch_queue_t dataQueue;
  163 +#else
161 @property (nonatomic, readonly, assign) dispatch_queue_t dataQueue; 164 @property (nonatomic, readonly, assign) dispatch_queue_t dataQueue;
  165 +#endif
162 166
163 @end 167 @end
@@ -185,8 +185,10 @@ @@ -185,8 +185,10 @@
185 185
186 - (void)dealloc 186 - (void)dealloc
187 { 187 {
  188 +#if ! OS_OBJECT_USE_OBJC
188 if (_dataQueue) 189 if (_dataQueue)
189 dispatch_release(_dataQueue); 190 dispatch_release(_dataQueue);
  191 +#endif
190 } 192 }
191 193
192 #pragma mark 194 #pragma mark