Skip to content

Commit fc12b94

Browse files
committed
Merge pull request #629 from ParsePlatform/nlutsenko.leak
Fix memory leak in PFSQLiteDatabase.
2 parents 399e348 + dd979f6 commit fc12b94

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Parse/Internal/LocalDataStore/SQLite/PFSQLiteDatabase.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,13 @@ - (instancetype)initWithPath:(NSString *)path {
6969
_databaseClosedTaskCompletionSource = [[BFTaskCompletionSource alloc] init];
7070
_databasePath = [path copy];
7171

72-
_databaseQueue = PFThreadsafetyCreateQueueForObject(self);
72+
dispatch_queue_t queue = PFThreadsafetyCreateQueueForObject(self);
73+
_databaseQueue = queue;
7374
_databaseExecutor = [BFExecutor executorWithBlock:^(dispatch_block_t block) {
7475
// Execute asynchrounously on the proper queue.
7576
// Seems a bit backwards, but we don't have PFThreadsafetySafeDispatchAsync.
7677
dispatch_async(dispatch_get_global_queue(0, 0), ^{
77-
PFThreadsafetySafeDispatchSync(_databaseQueue, block);
78+
PFThreadsafetySafeDispatchSync(queue, block);
7879
});
7980
}];
8081

0 commit comments

Comments
 (0)