                             if values.count == promises.count {
                                 promise.fulfill(values)
                                 pending = false
+                                values.removeAll(keepCapacity: false)
                             }
                         }
                     }

                }

                self.fulfillCallbacks.removeAll(keepCapacity: false)
            }
        }
        dispatch_semaphore_signal(self.mutex)

                    dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER)
                    do {
                        if pending {
                            promise.reject(error)
                            pending = false
                            values.removeAll(keepCapacity: false)
                        }
                    }
                    dispatch_semaphore_signal(lock)
