How can we help you today? How can we help you today?

How to find the cause of StreamAsIStream leak

I am writing a mixed WPF / Winforms application and find that when I create a new WPF view and present it using ElementHost, that two 5.04 MB byte[] objects are created on the Large Object Heap and are never disposed.

Using ANTS Memory Profiler 5.2, I see the object retention graph for these as showing:
    System.Byte[] (the object in question) System.IO.MemoryStream System.Windows.Media.StreamAsIStream GC Handle

I have filtered using "Kept in memory only by GC roots of type: COM+ (all other types were unticked).

According to other posts (e.g http://www.red-gate.com/MessageBoard/viewtopic.php?t=9521) this points at a native leak. But... I'm not sure how to progress.

Can anyone advise on how I can identify the source of the leak?

Many thanks
Alex
alexbusteed
0

Comments

4 comments

  • nick.maidment
    I just sent you an email, please let me know if you get it.
    nick.maidment
    0
  • mustangchik83
    I'm running into the same issue - 2 objects with the same retention graph:

    System.Byte[] (the object in question)
    System.IO.MemoryStream
    System.Windows.Media.StreamAsIStream
    GC Handle

    Both are gray indicating that dispose has been called. Together, they are taking up a whopping 5MB of memory. How can I track this further?

    Thanks,
    rachel
    mustangchik83
    0
  • AndyCombes
    I am also having this problem.

    WinForms application hosting a WPF application, leaking 2-3Mb byte arrays via the same retention graph.

    Has anybody shed any light on this yet?
    AndyCombes
    0
  • nick.maidment
    It would probably be worth emailing your results to support @ red-gate . com for further analysis
    nick.maidment
    0

Add comment

Please sign in to leave a comment.