很多时候,不注意这些细节,直接把bitmap放入List集合中,再者用完忘记清空bitmap,List集合,很容易造成内存泄露
就算你有良好的编程习惯,用完就清空掉,但是数据在list.add()循环的时候就报内存泄露了,还没等你清空,已经oom了
所以,开发中不建议把Bitmap放入list集合中...
分类:
其他好文 时间:
2014-07-22 23:04:34
阅读次数:
287
在浏览器与服务器进行交互时,往往需要把涉及到的一些数据保存下来,这时就需要使用cookie或session进行状态管理。
这篇文章先来说说session怎么用,首先在servlet中创建一个session来保存信息,举个例子,在做登陆验证时,如果登陆成功,需要将用户的信息保存到session中,怎么保存呢?下面给出代码:
public class Login_Do extends HttpS...
分类:
Web程序 时间:
2014-07-22 23:03:52
阅读次数:
355
*************************** list.txt : 目录
********************************1. variable.sh2. condition.sh3. control.sh4.
AndOr.sh5. statementBlock.sh6. ...
分类:
系统相关 时间:
2014-07-22 23:00:55
阅读次数:
382
Problem DescriptionIgnatius has just come back
school from the 30th ACM/ICPC. Now he has a lot of homework to do. Every teacher
gives him a deadline o...
分类:
其他好文 时间:
2014-05-01 20:49:40
阅读次数:
563
版本不对的原因。具体在10.5.9下修改此参数即可解决问题。LoadFunction()
has an ACritical parameter. It is set to True by default, but can be set to
False for individual function...
分类:
系统相关 时间:
2014-05-01 20:14:57
阅读次数:
594
这个五月份,what will to
do?1、软件设计师考试2、英语六级考试3、暑假的实习前几天的教训,不会忘记,现在总会有那么一种模式叫做“许冰模式”。所有的语言都是苍白的,即使我们可以尽情的洋洋洒洒的描述,但是,最后提取的关键字,就是那几个名词,刺眼的名词,我会用实际行动去表达。还是那一句:做...
分类:
其他好文 时间:
2014-05-01 19:56:40
阅读次数:
334
SL:List Dishes
=...;ServiceReference1.Service1Client myClient = new
Service1Client();myClient.MakeOrderAsync(Dishes);WEB:[OperationContract]public
Boo...
分类:
Web程序 时间:
2014-05-01 19:54:53
阅读次数:
590
Determine whether an integer is a palindrome.
Do this without extra space.Some hints:Could negative integers be palindromes?
(ie, -1)If you are thinki...
分类:
其他好文 时间:
2014-05-01 19:48:19
阅读次数:
344
方法1:Guid guid = new Guid
("{8238B046-EC5F-46B6-8E18-028F77EC2620}");SPSite Asite = new SPSite
("http://mosslt/");SPList list = Asite.RootWeb.Lists[gui...
分类:
其他好文 时间:
2014-05-01 18:38:35
阅读次数:
290