Split the different Destroy and Dispose signatures.

This commit is contained in:
Jarl Gullberg 2017-06-13 22:42:52 +02:00
parent af5be093a8
commit 3d60cf2bf6
No known key found for this signature in database
GPG key ID: 750FF6F6BDA72D23

View file

@ -177,34 +177,47 @@ namespace OpenTK
Dispose(false);
}
#if GTK3
/// <summary>
/// Destroys this <see cref="Widget"/>, disposing it and destroying it in the context of GTK.
/// </summary>
public override void Destroy()
#else
{
GC.SuppressFinalize(this);
Dispose(true);
base.Destroy();
}
#if !GTK3
/// <summary>
/// Disposes the current object, releasing any native resources it was using.
/// </summary>
/// <param name="disposing"></param>
public override void Dispose()
#endif
{
GC.SuppressFinalize(this);
Dispose(true);
#if GTK3
base.Destroy();
#else
base.Dispose();
#endif
}
base.Dispose();
}
#endif
#if GTK3
/// <summary>
/// Disposes the current object, releasing any native resources it was using.
/// </summary>
/// <param name="disposing"></param>
protected override void Dispose(bool disposing)
{
base.Dispose(disposing);
#else
/// <summary>
/// Disposes the current object, releasing any native resources it was using.
/// </summary>
/// <param name="disposing"></param>
public virtual void Dispose(bool disposing)
{
#endif
if (disposing)
{
_GraphicsContext.MakeCurrent(_WindowInfo);