SilverLight - Memory Leak
There is a memory leak issue in current silverlight project.
It occurs in the search function: the memory usage of corresponding IE process increase about 30MB per search, and never get down.
Here is the way I found the bug and fix it:
1. download Windbg from official site:http://www.windbg.org/
2. Dump the heap by the command: !dumpheap -stat -type <my project namespace>
So many objects......
3. copy the object data to a text file with named first_seach.txt.
4. tpye command "g" to keep running. And execute the second search function.
5. Break it, and dump the heap again: !dumpheap -stat -type <my project namespace>
6. do same operation to get the third heap dump.
7. compare the three txt file, and find the object numbers rule.
8. Luckly, I found my custom data grid object number is the same with the search times. There is the smoking gun.
9. There are dragdrop and contextMenu in this data grid. And both them can cause memory leak:
http://silverlight.codeplex.com/workitem/6206
https://silverlight.codeplex.com/workitem/7089
http://blog.thekieners.com/2010/02/11/simple-weak-event-listener-for-silverlight/
So the drag drop and contextMenu are the bullets.
10. follow the fix: open the source code which is already installed on local machine: C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Toolkit\dec11\Source
11. replace the two bad file: ContextMenu.cs and dragdroptarget.cs. I uploaded both the two files here: http://files.cnblogs.com/crazyghostvon/Sourcecode.zip
12. Build to release. The test project will build failed if you didn't copy the testing references (C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Toolkit\dec11\Testing\*) to the Binaries folder( C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Toolkit\dec11\Source\Source code\Binaries).
13. Replace the framework references (C:\Program Files (x86)\Microsoft SDKs\Silverlight\v5.0\Toolkit\dec11\Bin)
14. Replace the references of current project, delete it and re-add them all.
15. OK.
SilverLight - Memory Leak的更多相关文章
- Android 内存管理 &Memory Leak & OOM 分析
转载博客:http://blog.csdn.net/vshuang/article/details/39647167 1.Android 进程管理&内存 Android主要应用在嵌入式设备当中 ...
- quartz集群报错but has failed to stop it. This is very likely to create a memory leak.
quartz集群报错but has failed to stop it. This is very likely to create a memory leak. 在一台配置1核2G内存的阿里云服务器 ...
- 山东省第七届ACM省赛------Memory Leak
Memory Leak Time Limit: 2000MS Memory limit: 131072K 题目描述 Memory Leak is a well-known kind of bug in ...
- caching redirect views leads to memory leak (Spring 3.1)
在Spring 3.1以及以下版本使用org.springframework.web.servlet.view.UrlBasedViewResolver + cache(如下配置),在会出现任意种re ...
- 一则JVM memory leak解决的过程
起因是我们的集群应用(3台机器)新版本测试过程中,一般的JVM内存占用 都在1G左右, 但在运行了一段时间后,慢慢升到了4G, 这是一个明显不正常的现象. 定位 过程: 1.先在该机器上按照步骤尝试重 ...
- Linux C/C++ Memory Leak Detection Tool
目录 . 内存使用情况分析 . 内存泄漏(memory leak) . Valgrind使用 1. 内存使用情况分析 0x1: 系统总内存的分析 可以从proc目录下的meminfo文件了解到当前系统 ...
- A memory leak issue with WPF Command Binding
Background In our application, we have a screen which hosts several tabs. In each tab, it contains a ...
- quartzScheduler_Worker-1] but has failed to stop it. This is very likely to create a memory leak解决
01-Jul-2016 07:24:20.218 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 80 ...
- tomcat 6.0.44 “has failed to stop it. This is very likely to create a memory leak” 问题调查
1. 问题起因 我们项目中缓存模块某个实现采用了ehcache(2.4.3),当项目部署到tomcat中后,对tomcat做停止服务操作(点击eclipse的console红色的停止按钮,奇怪的是有小 ...
随机推荐
- ExpandableListView二级列表
package com.example.dajj; import android.os.Bundle;import android.app.Activity;import android.view.M ...
- 如何在JBoss WildFly 8 自定义log4j日志
最近在 JBoss WildFly 8 下部署 Web应用,自定义的 log4j 日志不工作.console下无日志输出,用System.out.println都不输出内容到console. 原因是J ...
- HDFS介绍
一.HDFS概述 1.HDFS设计思想来源于Google的GFS,是GFS的开源实现. 2.HDFS要解决的问题: -存储超大文件,比如TB级别 -防止文件丢失. 3.HDFS的特点 -可以存储超大文 ...
- 桥接模式(Bridge)
桥接模式(Bridge),将抽象部分与它的实现部分分离,使它们都可以独立地变化.Bridge 模式把角色之间的继承关系改为了耦合的关系,从而使这两者可以从容自若的各自独立的变化: 在以下的情况下应当使 ...
- 20151215单选按钮列表,复选框列表:CheckBoxList
单选框:RadioButton GroupName:组名,如果要实现单选效果每个单选按钮的组名必须一样 是否被选中 RadioButton.checked 单选按钮列表:RadioButtonList ...
- SQL Server 2012 配置数据库邮件
发送和接受邮箱不能用QQ邮箱,可以用163网易邮箱,同时要求要发送邮件的计算机能上外网 查看163网易邮箱的发送和接收服务器的方法如下 在数据库的管理中,右击数据库邮件,选择配置数据库邮件 出现对话框 ...
- Protocol Buffer技术
转载自http://www.cnblogs.com/stephen-liu74/archive/2013/01/02/2841485.html 该系列Blog的内容主体主要源自于Protocol Bu ...
- phonegap文件,目录操作以及网络上传,下载文件(含demo)
正在做一个跨平台的应用,需要使用phonegap进行文件的一些基本操作. 需求如下:可以选择本地图片,或者从相机选择图片,并进行显示在本地,然后上传到服务器,以及可以从服务器下载图片显示出来,如果本地 ...
- 文件_ _android从资源文件中读取文件流并显示的方法
======== 1 android从资源文件中读取文件流并显示的方法. 在android中,假如有的文本文件,比如TXT放在raw下,要直接读取出来,放到屏幕中显示,可以这样: private ...
- 利用WCF的双工通讯实现一个简单的心跳监控系统 z
利用WCF的双工通讯实现一个简单的心跳监控系统 http://www.cnblogs.com/zuowj/p/5761011.html 何为心跳监控系统? 故名思义,就是监控某个或某些个程序的运行状态 ...