From: Jarl Gullberg Date: Tue, 13 Jun 2017 20:42:52 +0000 (+0200) Subject: Split the different Destroy and Dispose signatures. X-Git-Tag: v3.0.0~96^2~12 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3d60cf2bf6b64d35bcf039eb52c48cc757a7ed66;p=platform%2Fcore%2Fcsapi%2Fopentk.git Split the different Destroy and Dispose signatures. --- diff --git a/src/OpenTK.GLWidget/GLWidget.cs b/src/OpenTK.GLWidget/GLWidget.cs index c1d3c5e..e2c0efa 100644 --- a/src/OpenTK.GLWidget/GLWidget.cs +++ b/src/OpenTK.GLWidget/GLWidget.cs @@ -177,34 +177,47 @@ namespace OpenTK Dispose(false); } -#if GTK3 /// /// Destroys this , disposing it and destroying it in the context of GTK. /// public override void Destroy() -#else + { + GC.SuppressFinalize(this); + Dispose(true); + + base.Destroy(); + } + +#if !GTK3 /// /// Disposes the current object, releasing any native resources it was using. /// /// public override void Dispose() -#endif { GC.SuppressFinalize(this); Dispose(true); -#if GTK3 - base.Destroy(); -#else + base.Dispose(); -#endif } +#endif +#if GTK3 + /// + /// Disposes the current object, releasing any native resources it was using. + /// + /// + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); +#else /// /// Disposes the current object, releasing any native resources it was using. /// /// public virtual void Dispose(bool disposing) { +#endif if (disposing) { _GraphicsContext.MakeCurrent(_WindowInfo);