mirror of
https://github.com/groue/GRDB.swift
synced 2026-11-30 04:28:44 +00:00
README.md
This commit is contained in:
1 parent
318a485a92
commit
bcafd3c9b9
1 file changed
+2
-1
@@ -2499,11 +2499,12 @@ This method blocks the current thread until all current database accesses are co
|
||||
|
||||
You should call the `releaseMemory` method when your application receives a memory warning, and when it enters background. Since `releaseMemory` is blocking, dispatch it to some background queue so that you avoid freezing your user interface.
|
||||
|
||||
For example, assuming a global `dbQueue`:
|
||||
For example:
|
||||
|
||||
```swift
|
||||
@UIApplicationMain
|
||||
class AppDelegate: UIResponder, UIApplicationDelegate {
|
||||
var dbQueue: DatabaseQueue!
|
||||
|
||||
func applicationDidReceiveMemoryWarning(application: UIApplication) {
|
||||
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0)) {
|
||||
|
||||
Reference in new issue
Block a user