K
Koliber (js)
sorry for my not perfect english
i am really f&*ckin angry
in this common pattern about dispose:
//////////////////////////////////////////////////////////
Public class MyClass:IDisposable
{
private bool IsDisposed=false;
public void Dispose()
{
Dispose(true);
GC.SupressFinalize(this);
}
protected void Dispose(bool Diposing)
{
if(!IsDisposed)
{
if(Disposing)
{
//Clean Up managed resources
}
//Clean up unmanaged resources
}
IsDisposed=true;
}
~MyClass()
{
Dispose(false);
}
}
////////////////////////////
most of things are clear -
there are two ways of calling dispose - one from finalizer (only
unmanaged managed will free automatically
if i do understand) second by Dispose() (managed and unamanaged by
hand) BUT
what the hell " //Clean Up managed resources " mean
pozdrawiam (greetings)
C Kinbote
i am really f&*ckin angry
in this common pattern about dispose:
//////////////////////////////////////////////////////////
Public class MyClass:IDisposable
{
private bool IsDisposed=false;
public void Dispose()
{
Dispose(true);
GC.SupressFinalize(this);
}
protected void Dispose(bool Diposing)
{
if(!IsDisposed)
{
if(Disposing)
{
//Clean Up managed resources
}
//Clean up unmanaged resources
}
IsDisposed=true;
}
~MyClass()
{
Dispose(false);
}
}
////////////////////////////
most of things are clear -
there are two ways of calling dispose - one from finalizer (only
unmanaged managed will free automatically
if i do understand) second by Dispose() (managed and unamanaged by
hand) BUT
what the hell " //Clean Up managed resources " mean
pozdrawiam (greetings)
C Kinbote