Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/305.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# Silverlight内存泄漏_C#_Silverlight - Fatal编程技术网

C# Silverlight内存泄漏

C# Silverlight内存泄漏,c#,silverlight,C#,Silverlight,我已经为此挣扎了一段时间,但我真的找不到解决办法。我已经检查了所有的标准内存泄漏问题,如页面活动、数据模板等,但不是这样的。我正在使用windbg和!我得到: DOMAIN097C9970:HANDLEPinned:52412f8:Root:0ade4260System.Object[]-> 09deab28System.Collections.Generic.List`1[[System.Object,mscorlib]]-> 0A3A8708系统对象[]-> 0a42beccSystem.W

我已经为此挣扎了一段时间,但我真的找不到解决办法。我已经检查了所有的标准内存泄漏问题,如页面活动、数据模板等,但不是这样的。我正在使用windbg和!我得到:

DOMAIN097C9970:HANDLEPinned:52412f8:Root:0ade4260System.Object[]-> 09deab28System.Collections.Generic.List`1[[System.Object,mscorlib]]-> 0A3A8708系统对象[]-> 0a42beccSystem.Windows.Shapes.Rectangle-> 0a4267e4System.Windows.Controls.Grid-> 0a40da84System.Windows.Controls.Primitives.CalendarDayButton-> 0A3CC8E8系统.窗口.控件.日历-> 0a3ccd44System.Windows.Input.MouseButtonEventHandler-> 0a3cc828System.Windows.Controls.DatePicker-> 0a3cd594System.Windows.Controls.StackPanel-> 0a3cd690System.Windows.Controls.StackPanel-> 0a3cfcd0System.Windows.Controls.StackPanel-> 0a3cfdccSystem.Windows.Controls.Border-> 0a3e11f0System.Windows.Controls.ContentPresenter-> 0a3e00d0System.Windows.Controls.ContentControl-> 0a3dffd4System.Windows.Controls.Grid-> 0a3e02d0System.Windows.Controls.Border-> 0a3de464System.Windows.Controls.Grid-> 0a3cc160System.Windows.Controls.Expander-> 0A3CC0B8系统.窗口.控件.堆栈面板-> 0A3D4078系统.窗口.控件.网格-> 0A3D4174系统.窗口.控件.堆栈面板-> 0a3d4f90System.Windows.Controls.ContentPresenter-> 0a3d6398System.Windows.Controls.ContentPresenter-> 0a3d4ff4System.Windows.Controls.ContentControl-> 0a3d51e4System.Windows.Controls.Grid-> 0a3cadd4System.Windows.Controls.Activity-> 0A3CAA4系统.窗口.控件.网格-> 0a3ca310EMSOLG.Registration.StudentPayDetails

有没有办法让我更详细地了解泄漏的地方

当我更改组合框的选定值时会发生这种情况

<ComboBox x:Name="cmbPaymentMethod" Height="23" Background="LightYellow"  
 DisplayMemberPath="Value" SelectedValuePath="Key" 
 SelectedValue="{Binding intPaymentMethod,Mode=TwoWay}"
 SelectionChanged="cmbPaymentMethod_SelectionChanged" />

卸载控件时,我尝试设置DataContext=null;以及我认为可能导致泄漏的大量其他控件和变量

好的,因此我们实际上刚刚为silverlight购买了Telerik工具,但如果您真的想解决问题,可以查看2009年11月工具包的源代码,更新的版本应该是固定的,然后在关闭日历弹出窗口后取消订阅EventHandler。

只需我的2美分,但是你有没有研究过VS2010 SP1,它是Beta版,但应该有silverlight profiler?它叫做性能向导@Giddy:我想只有在终极版中才能找到。你一定对它附带的源代码有一些了解吧?谢谢你的回复,我会看看性能分析器。就源代码而言,我已经准备好了所有可用的东西,但实际上并没有什么奇怪的事情发生:我有点困惑。你怎么知道你有内存泄漏?你在泄漏什么东西?有多少人被泄露?
PageActivity.IsActive = true;
tblAppForm thisApplication = (tblAppForm)this.DataContext;
thisApplication.curInvoiceAmount = 0;
RG.Amount = ;
thisApplication.curRecovery = 0;
txtInvoiceTotal.Text = "0.00";