none
Silverlight 5 memory leaks

    Question

  • Hello,

    We have a problem with our SL5 application (really big one). Continuous navigation causing a major memory leak (the application crash with OutOfMemoryException). I try to investigate the problem, and found a huge growth of a ManagedPeerTable collection. Our UI classes releasing normally (debugbreaks in destructor hit as I expected), but ManagedPeerTable collect the referenses (over 40k !) till the application crushed. I try to google a solution, but can't find nothing interesting about that issue. Please, help!

    P.S. Sorry for my english, I know it's ugly.

    Tuesday, December 12, 2017 9:05 AM

All replies

  • I wonder how is the performance of your PC? If it's the 32bit with 4GB RAM the it won't be surprise to get crash.

    I’m afraid the reason is that your memory is fragmented and the allocator cannot find a big enough hole to allocate the needed memory.

    Suggestions:

    1. Switch to 64 bit OS if it's not.
    2. Modify the algorithm or code, let it not need a big chunk of memory. Maybe allocate a few smaller (relatively) chunks of memory.

     

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Thursday, December 14, 2017 8:18 AM
  • Hi Fletch, thanks for response.

    We've tried a i7+8Gb RAM + Win7 64, the crash still happens. I don't think the cause is pc configuration: if we'll double the RAM size, it'll crash later, cause the memory still leaking. I dont understand, why ManagedPeerTable size grows, despite properly releasing all references (the destructor definitely calls).

    Monday, December 18, 2017 9:22 AM
  • Maybe the tutorial on troubleshooting Silverlight memory leaks on this blog could help:

    Identifying the root of a memory leak in Silverlight using windbg

     

    Regards,

    Fletcher


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Friday, December 22, 2017 7:38 AM