Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用YYCache在项目中会报卡顿异常 -[YYKVStorage _dbClose] (YYKVStorage.m:) #69

Closed
CodeRabbitYu opened this issue Jul 30, 2016 · 6 comments

Comments

@CodeRabbitYu
Copy link

libsystem_kernel.dylib fcntl + 8
1 libsystem_kernel.dylib fcntl + 128
2 libsqlite3.dylib sqlite3_free_table + 49568
3 libsqlite3.dylib sqlite3_wal_checkpoint + 3456
4 libsqlite3.dylib sqlite3_bind_int64 + 7480
5 libsqlite3.dylib sqlite3_bind_int64 + 6604
6 libsqlite3.dylib sqlite3_bind_int64 + 4892
7 libsqlite3.dylib sqlite3_backup_finish + 756
8 libsqlite3.dylib sqlite3_total_changes + 1024
9 ShunLianPower -YYKVStorage _dbClose
10 ShunLianPower -YYKVStorage dealloc
11 libobjc.A.dylib object_cxxDestructFromClass(objc_object_, objc_class_) + 148
12 libobjc.A.dylib objc_destructInstance + 92
13 libobjc.A.dylib object_dispose + 28
14 ShunLianPower -YYDiskCache dealloc
15 ShunLianPower -YYCache .cxx_destruct
16 libobjc.A.dylib object_cxxDestructFromClass(objc_object_, objc_class_) + 148
17 libobjc.A.dylib objc_destructInstance + 92
18 libobjc.A.dylib object_dispose + 28
19 ShunLianPower destroy_helper_block (SLHttpRequest.m:0)
20 libsystem_blocks.dylib Block_release + 156
21 ShunLianPower -AFURLSessionManagerTaskDelegate .cxx_destruct
22 libobjc.A.dylib object_cxxDestructFromClass(objc_object
, objc_class
) + 148
23 libobjc.A.dylib objc_destructInstance + 92
24 libobjc.A.dylib object_dispose + 28
25 ShunLianPower _destroy_helper_block (AFURLSessionManager.m:0)
26 libsystem_blocks.dylib _Block_release + 156
27 libdispatch.dylib __dispatch_client_callout + 16
28 libdispatch.dylib _dispatch_main_queue_callback_4CF + 1844
29 CoreFoundation ___CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE
+ 12
30 CoreFoundation ___CFRunLoopRun + 1628
31 CoreFoundation CFRunLoopRunSpecific + 384
32 GraphicsServices GSEventRunModal + 180
33 UIKit UIApplicationMain + 204
34 ShunLianPower main (main.m:14)
35 libdyld.dylib _start + 4

@ibireme
Copy link
Owner

ibireme commented Jul 31, 2016

不要频繁的创建和销毁 cache,一般来讲弄个单例就好。

@CodeRabbitYu
Copy link
Author

是要再封装一下吗? 我只是再登陆的时候把返回信息中关于验证登录的信息存储了一下, 然后在退出的时候清空.

@ibireme ibireme closed this as completed Aug 1, 2016
@ibireme ibireme reopened this Aug 1, 2016
@ibireme
Copy link
Owner

ibireme commented Aug 1, 2016

使用的话无所谓,只是不需要频繁创建和销毁,不然缓存就没意义了。

另外,登录token这种东西,不太适合用缓存来保存,缓存是易失的。

@CodeRabbitYu
Copy link
Author

哦哦...YYCache 不是也可以做本地保存吗? 要用NSKeyedArchiver 这个吗?

@ibireme
Copy link
Owner

ibireme commented Aug 1, 2016

缓存和持久化存储是有差别的,按不同场景使用吧。

@CodeRabbitYu
Copy link
Author

好的.谢谢了

@ibireme ibireme closed this as completed Aug 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants