Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
615
LeftImages memory leak WinForms WinTree
posted

I have a tree with about 1000 nodes.  Each node is assigned an image, there are two types of images, from two Image references.  They are from an Image C# class loaded from a resource.  When I add all my nodes, there are two levels of nodes, lets say 100 parents and 900 children spread throughout. 

With the LeftImages.Add to the node (I also tried Override.NodeAppearance.Image = ) to the same two Image references, they all show up fine, but I get a memory leak of 4 to 20K a second which never stops.  If I comment out the LeftImages.Add it doesn't leak.

Any ideas/workarounds?

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi,

    First, what version of the controls are you using?

    AberAber said:
    I get a memory leak of 4 to 20K a second which never stops.

    Are you constantly updating the nodes or the images? There is no reason why the memory usage should continue to increase on a per-second basis unless your code is doing something like adding more nodes or creating more images.

    Can you post a small sample project demonstrating what you are doing? Are you certain that you are using the same image instance every time? If you are simply referencing resources.imageName then I am pretty sure that every time you get that property value, they return a new instance of the same image.

     

Children
No Data