File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -119,21 +119,21 @@ extension DatabaseQueue {
119
119
120
120
let task : UIBackgroundTaskIdentifier = application. beginBackgroundTask ( expirationHandler: nil )
121
121
if task == . invalid {
122
- // Perform releaseMemory() synchronously.
122
+ // Release memory synchronously
123
123
releaseMemory ( )
124
124
} else {
125
- // Perform releaseMemory() asynchronously.
126
- DispatchQueue . global ( ) . async {
127
- self . releaseMemory ( )
125
+ // Release memory asynchronously
126
+ writer . async { db in
127
+ db . releaseMemory ( )
128
128
application. endBackgroundTask ( task)
129
129
}
130
130
}
131
131
}
132
132
133
133
@objc
134
134
private func applicationDidReceiveMemoryWarning( _ notification: NSNotification ) {
135
- DispatchQueue . global ( ) . async {
136
- self . releaseMemory ( )
135
+ writer . async { db in
136
+ db . releaseMemory ( )
137
137
}
138
138
}
139
139
#endif
You can’t perform that action at this time.
0 commit comments