F
Fernando Cacciola
Help me out here please:
While watching Brad Abraham's MSDN TV talk about the Dispose pattern,
refering to:
public virtual void Dispose ( bool disposing )
{
if ( disposing )
{
<-- WHAT GOES HERE -->
}
}
He says: ..."here's were I'll free all my dependent objects, these are
things like managed resources... maybe you are in a form and you want to
free all the instances that are also on the form"...
I don't get that... how is Dispose going to help me free dependent objects
and managed resources? Isn't Dispose ONLY about releasing unmanaged
resources?
What am I missing?
TIA
Fernando Cacciola
While watching Brad Abraham's MSDN TV talk about the Dispose pattern,
refering to:
public virtual void Dispose ( bool disposing )
{
if ( disposing )
{
<-- WHAT GOES HERE -->
}
}
He says: ..."here's were I'll free all my dependent objects, these are
things like managed resources... maybe you are in a form and you want to
free all the instances that are also on the form"...
I don't get that... how is Dispose going to help me free dependent objects
and managed resources? Isn't Dispose ONLY about releasing unmanaged
resources?
What am I missing?
TIA
Fernando Cacciola