2
0
mirror of https://github.com/koreader/koreader synced 2024-11-10 01:10:34 +00:00

Merge pull request #1228 from hwhw/fix_koptcontext_free

wait for background thread before free()ing koptcontext
This commit is contained in:
Huang Xin 2014-11-22 22:53:36 +08:00
commit 65938c9f9a

View File

@ -23,6 +23,7 @@ local ContextCacheItem = CacheItem:new{}
function ContextCacheItem:onFree() function ContextCacheItem:onFree()
if self.kctx.free then if self.kctx.free then
KoptInterface:waitForContext(self.kctx)
DEBUG("free koptcontext", self.kctx) DEBUG("free koptcontext", self.kctx)
self.kctx:free() self.kctx:free()
end end