开发者

TreeView.Items.Filter Memory Leak, HELP!

I'm having this terrible problem, i have a tree view and i'm using the it's Items.Filter to support search options.

My TreeView is also virtual开发者_JAVA百科ized cuase it contains tones of items and if not virtualized it takes a minute for the UI to load.

My problem is that whenever i set a filter it seems that the memory usage grows by 20M!!!

  1. I don't understand why the ListBox won't use the items it already has and why it needs to create new items (i see calls to the child item's constructors)
  2. Why the hell won't it release the old UI elements from the memory?!

PLEASE HELP!!! Gili


Are you sure that the old UI elements aren't released? Try calling GC.Collect(); and see if you loose those 20M, this is not considered a good thing to do but it would verify if the UI elements are released or not.

And does it grow 20M each time you set a filter or just the first time?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜