FlowDocument Memory Issue in C#

前端 未结 8 1723
孤街浪徒
孤街浪徒 2021-01-02 15:34

I am currently attempting to deal with an issue with releasing a FlowDocument resources. I am loading an rtf file and putting it into a FlowDocument with TextRange.Load. I n

8条回答
  •  悲哀的现实
    2021-01-02 16:23

    I tried to reproduce your problem, but it doesn't happen on my machine.

    Task Manager shows working set size, which isn't an accurate representation of a program's memory usage. Try using perfmon instead.

    1. Start -> Run -> perfmon.msc
    2. Add .NET CLR Memory/#Bytes in All Heaps for your application

    Now repeat the experiment and check if that counter keeps going up. If it doesn't, it means you aren't leaking any managed memory.

提交回复
热议问题