From bcafd3c9b9fe5546e07fc07076a6c4eb29e5471d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gwendal=20Roue=CC=81?= Date: Sat, 12 Mar 2016 15:32:15 +0100 Subject: [PATCH] README.md --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f88ced8fb..f17471555 100644 --- a/README.md +++ b/README.md @@ -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)) {