-1

I am using windows form application with binding source. I have initialized the binding source as below code in form InitializeComponenet() method. Can I know the below code is correct?

private System.Windows.Forms.BindingSource bindingSource1;
private void InitializeComponent()
{
this.bindingSource1 = new System.Windows.Forms.BindingSource(this.components);;
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).BeginInit();
this.SuspendLayout();
this.bindingSource1.DataSource = typeof(WindowsFormsApplication2.Class1);

control.DataSource = this.bindingSource1;
((System.ComponentModel.ISupportInitialize)(this.bindingSource1)).EndInit();
this.ResumeLayout(false);
}

When making any changes in designer, then run the sample, the visual studio goes to Not Responding state. So I suspect some memory leak problem in the control, so how can i found the memory leak problem or visual studio not responding problem?

Jagadeesan
  • 233
  • 1
  • 13

1 Answers1

0

Using a memory profiler. Simple as that. VS has one. And then there is always memprofiler.

This is about the only way to find a memory leak and analyze it.

TomTom
  • 61,059
  • 10
  • 88
  • 148