summaryrefslogtreecommitdiff
path: root/platform/default/sqlite_cache.cpp
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-05-01 17:14:06 -0400
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-05-01 17:14:06 -0400
commit24695f6c0274cac8ae17df3765e0cc54c5668047 (patch)
treefdc9e4ecc85a61fabf3cf0619f1be44a4488e721 /platform/default/sqlite_cache.cpp
parentdac4b7d3c95f84358bd475e01aae45e2ca52ddc0 (diff)
downloadqtlocation-mapboxgl-24695f6c0274cac8ae17df3765e0cc54c5668047.tar.gz
More bandaids to avoid #1309
Even though we only bind the shared_ptr in the after callback, the worker thread was still copying the callback and therefore gaining a shared reference. Here we try to eliminate the copies.
Diffstat (limited to 'platform/default/sqlite_cache.cpp')
-rw-r--r--platform/default/sqlite_cache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/default/sqlite_cache.cpp b/platform/default/sqlite_cache.cpp
index 6ba21c2813..83d42d5a5c 100644
--- a/platform/default/sqlite_cache.cpp
+++ b/platform/default/sqlite_cache.cpp
@@ -131,7 +131,7 @@ void SQLiteCache::get(const Resource &resource, Callback callback) {
// Will try to load the URL from the SQLite database and call the callback when done.
// Note that the callback is probably going to invoked from another thread, so the caller
// must make sure that it can run in that thread.
- thread->invokeWithResult(&Impl::get, callback, resource);
+ thread->invokeWithResult(&Impl::get, std::move(callback), resource);
}
std::unique_ptr<Response> SQLiteCache::Impl::get(const Resource &resource) {