B
billq
Hello,
I am new to c# and have become confused about freeing resources. I need to
know if using an objects Dispose method does the same thing as setting the
object to null?
Pen bluePen = new Pen( Color.Blue, 2 );
//use pen
bluePen.Dispose();
as opposed to:
Pen bluePen = new Pen(Color.Blue, 2);
//use pen
bluePen = null;
I appreciate your help
thank you
bill
I am new to c# and have become confused about freeing resources. I need to
know if using an objects Dispose method does the same thing as setting the
object to null?
Pen bluePen = new Pen( Color.Blue, 2 );
//use pen
bluePen.Dispose();
as opposed to:
Pen bluePen = new Pen(Color.Blue, 2);
//use pen
bluePen = null;
I appreciate your help
thank you
bill