WPF Memory Usage

前端 未结 5 730
礼貌的吻别
礼貌的吻别 2021-02-08 20:56

Application:

  • WPF Application consisting of a textbox on top and a listbox below
  • Users type a string in the TextBox to find employees, and search results
5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-08 21:42

    It really seems to be memory leaking. Probably, some of the UI elements in the DataTemplate keep references to other objects that should stay alive even when the UI element is destroyed.

    There could be some memory leaks with Image control. Try removing it from the template and see the result. Also, are you subscribing to any events in controls' Loaded events or something like that?

    Just some guesses though... As people already said here you might really want to look at your app with performance and memory profilers.

提交回复
热议问题