Closed huangy10 closed 8 years ago
I notice that you free the db connection at the end of execution:
- (void)executionFailure:(void (^)(NSArray* results))completion { [self.callbackQueue addOperationWithBlock:^{ if (completion) completion(nil); }]; //Clean up dbfreebuf(connection); } //Invokes execution completion handler on callback queue with results array - (void)executionSuccess:(void (^)(NSArray* results))completion results:(NSArray*)results { [self.callbackQueue addOperationWithBlock:^{ if (completion) completion(results); }]; //Clean up dbfreebuf(connection); }
Then should I still have to call the disconnect function in the callback closure like you did in the sample code?
dbfreebuf only clears the command buffer, it does not close the connection.
dbfreebuf
I notice that you free the db connection at the end of execution:
Then should I still have to call the disconnect function in the callback closure like you did in the sample code?