mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-07-01 10:28:20 +00:00
Split the different Destroy and Dispose signatures.
This commit is contained in:
parent
af5be093a8
commit
3d60cf2bf6
|
@ -177,34 +177,47 @@ namespace OpenTK
|
||||||
Dispose(false);
|
Dispose(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if GTK3
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Destroys this <see cref="Widget"/>, disposing it and destroying it in the context of GTK.
|
/// Destroys this <see cref="Widget"/>, disposing it and destroying it in the context of GTK.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public override void Destroy()
|
public override void Destroy()
|
||||||
#else
|
{
|
||||||
|
GC.SuppressFinalize(this);
|
||||||
|
Dispose(true);
|
||||||
|
|
||||||
|
base.Destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !GTK3
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Disposes the current object, releasing any native resources it was using.
|
/// Disposes the current object, releasing any native resources it was using.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing"></param>
|
/// <param name="disposing"></param>
|
||||||
public override void Dispose()
|
public override void Dispose()
|
||||||
#endif
|
|
||||||
{
|
{
|
||||||
GC.SuppressFinalize(this);
|
GC.SuppressFinalize(this);
|
||||||
Dispose(true);
|
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>
|
/// <summary>
|
||||||
/// Disposes the current object, releasing any native resources it was using.
|
/// Disposes the current object, releasing any native resources it was using.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="disposing"></param>
|
/// <param name="disposing"></param>
|
||||||
public virtual void Dispose(bool disposing)
|
public virtual void Dispose(bool disposing)
|
||||||
{
|
{
|
||||||
|
#endif
|
||||||
if (disposing)
|
if (disposing)
|
||||||
{
|
{
|
||||||
_GraphicsContext.MakeCurrent(_WindowInfo);
|
_GraphicsContext.MakeCurrent(_WindowInfo);
|
||||||
|
|
Loading…
Reference in a new issue