I am quite new to c#, I have the following code segments and both of them cause the program to throw
System.ComponentModel.Win32Exception indicating that memory is not enough.
Both of the code segments is in a form.
System.Drawing.Graphics g = this CreateGraphics();
System.Drawing.BufferedGraphicsContext c = System.Drawing.BufferedGraphicsManager.Current;
System.Drawing.BufferedGraphics b = c.Allocate( g, new
System.Drawing.Rectangle(0,0,3000, 3000) );
this.Controls.Add( new Label() );
My question is shouldn't the resource created handled automatically by garbage collector ?
Thanks a lot.
View Complete Post