我的WPF应用程序出现了严重错误,看起来我在调度员等待运行时有2400万次操作。
带有sosex的windbg告诉我0:000> !dumpgen 2 -stat
Count Total Size Type
-------------------------------------------------
...
23,967,120 575,210,880 Catel.MVVM.Command`2+<>c__DisplayClass35_0[[System.Object, mscorlib],[System.Object, mscorlib]]
23,967,139 575,211,336 System.Windows.Threading.DispatcherOperationTaskSource`1[[System.Object, mscorlib]]
23,967,139 575,211,336 System.Windows.Threading.DispatcherOperationTaskMapping
23,967,139 575,211,336 System.Threading.Tasks.TaskCompletionSource`1[[System.Object, mscorlib]]
23,967,139 958,685,560 MS.Internal.CulturePreservingExecutionContext
23,967,120 1,533,895,680 System.Func`1[[System.Threading.Tasks.Task, mscorlib]]
23,967,139 1,533,896,896 System.Windows.Threading.PriorityItem`1[[System.Windows.Threading.DispatcherOperation, WindowsBase]]
23,967,554 1,533,923,456 System.Action
23,967,139 1,917,371,120 System.Threading.Tasks.Task`1[[System.Object, mscorlib]]
23,967,156 2,109,109,728 System.Threading.ExecutionContext
23,967,139 2,684,319,568 System.Windows.Threading.DispatcherOperation
有没有办法可以看到Action将要执行的实际代码?我基于上面的对象引用粗略了解发生了什么,但是看到Action将执行的实际代码将会有所帮助。