I am trying to implement a workflow designer in a windows form application and use the same designer to view different workflows. However, I found the program became slower and slower after loading several workflows.
my steps are as follows:
1. create a wpf user control WFDesigner to package the workflowdesigner;
2. In the user control WFDesigner , implement a InitiateDesigner method which create a new workflowDesigner
instance each time called. I suppose the old workflowDesigner instance would be collected by GC;
3. create a winform application and install the user control created on step 2 to an element host, and put the element host on the form.
4. add two buttons for test: one will execute WFDesigner.InitiateDesigner() once
and the other will execute it 100 times.
View Complete Post