We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

treeview Nodes.Clear() method doesn''t remove the child nodes from memory

Thread ID:

Created:

Updated:

Platform:

Replies:

51827 Nov 14,2006 10:35 PM UTC Nov 17,2006 07:16 PM UTC WinForms 4
loading
Tags: Tools
sunny
Asked On November 14, 2006 10:35 PM UTC

Hi,

We have encounted the memory leaking problem in a winform (.net 2.0) based application. one issue found is the syncfusion treeview control doesn't release the child nodes from memory after calling the nodes.clear().
the snipper of the code is as following:
treeView.Nodes.Clear();
In the memory profiler, the nodes object still exist after the call.
But if we remove the nodes one by one as following:
for (int index = treeView.Nodes.Count - 1; index > -1; index--)

{

treeView.Nodes.RemoveAt(index);

}

treeView.Nodes.Clear();

The treeview child nodes will disappear from the memory.

Is this a bug in syncfusion treeview control?

Sunny

Murugan [Syncfusion]
Replied On November 14, 2006 11:21 PM UTC

Hi sunny,

We have tested the issue with 4.2.0.37 and later version. We were not able to reproduce the issue. When calling TreeViewAdv.Nodes.Clear() , the memory used by the TreeNodeAdv control released properly. Herewith I have attached the memory snopshots of the TreeNodeAdv control using .Net Memory Profiler. Please let me know the Essential Studio version you are using. This will help us to analyse the issue further.
TreeNode.zip
Thanks for choosing Syncfusion products.

Best Regards,
Murugan P.S

Administrator [Syncfusion]
Replied On November 15, 2006 03:55 AM UTC

Hi,

Thanks for the fast response.
There are some difference from your testing and ours:
1) in the application the treenodes are added recursively, so the treeview will have a hierachical tree nodes in multiple level.
2) we are using memory profiler 3.0, and in the result the TreeNodeAdv are shown as "System object[]"(but when you drill down the live objects are treenodeAdv, I believe you are using 2.x version, the result is shown as "treenodeadv[]".

And we are using 4.2.0.37.

I am not sure whether the point 1) make the difference.

Sunny
>Hi sunny,

We have tested the issue with 4.2.0.37 and later version. We were not able to reproduce the issue. When calling TreeViewAdv.Nodes.Clear() , the memory used by the TreeNodeAdv control released properly. Herewith I have attached the memory snopshots of the TreeNodeAdv control using .Net Memory Profiler. Please let me know the Essential Studio version you are using. This will help us to analyse the issue further.
TreeNode.zip
Thanks for choosing Syncfusion products.

Best Regards,
Murugan P.S

Murugan [Syncfusion]
Replied On November 16, 2006 12:41 AM UTC

Hi,

We will check the issue using .Net Memory Profiler 3.0 and let know the details soon.

Thanks,
Murugan P.S

Murugan [Syncfusion]
Replied On November 17, 2006 07:16 PM UTC

Hi,

In my application treeNodeAdv controls memory is released properly but not in the case with your application. So before going to check with .Net memory profiler 3.0, please send me the sample which is having the issue. This will help us to resolve the issue soon.

Thanks,
Murugan P.S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;