码迷,mamicode.com
首页 > 其他好文 > 详细

拦截out of memory错误

时间:2015-01-22 23:12:42      阅读:183      评论:0      收藏:0      [点我收藏+]

标签:

1、在已发生oom的地方try——catch

        try {
            // 将原始图片按照旋转矩阵进行旋转,并得到新的图片
            returnBm = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(),
                    bm.getHeight(), matrix, true);
        } catch (OutOfMemoryError e) {
            e.printStackTrace();
        }

 

Done

拦截out of memory错误

标签:

原文地址:http://www.cnblogs.com/xingyyy/p/4242808.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!