9部短片小说都满有趣的。
作者: CouldHll
ARC forbids Objective-C objects in struct
问题描述:Xcode报错ARC forbids Objective-C objects in struct
问题解决:问题是struct中不支持NSObject对象,所以在前面加入
__unsafe_unretained脱离ARC解决。
《圣诞玫瑰》
《狄仁杰之神都龙王》
iOS查看进程方法
1.通过OpenSSH连上iOS设备运行ps命令查看(前提是通过Cydia安装adv-cmds)
2.通过Cydia安装SysInfoPlus查看(推荐)
《舞!舞!舞!》
《杂的文》
AnimationDrawable导致OOM内存泄露
问题描述:今天做ZTE,发现反复运行,会OOM。
问题解决:Google了如下解决办法,果然有效。
- Move code for AnimationDrawable to onResume() method.
- Add following code for releasing memory to onPause().
ad.stop(); for (int i = 0; i < ad.getNumberOfFrames(); ++i){ Drawable frame = ad.getFrame(i); if (frame instanceof BitmapDrawable) { ((BitmapDrawable)frame).getBitmap().recycle(); } frame.setCallback(null); } ad.setCallback(null);