README.md

This commit is contained in:
Gwendal Roué committed 2016-03-12 15:32:15 +01:00
1 parent 318a485a92
commit bcafd3c9b9
1 file changed
+2 -1
+2 -1
View File
@@ -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)) {