diff options
| author | Sarah B <git@sarahduck.ca> | 2024-01-20 15:28:48 -0800 |
|---|---|---|
| committer | Sarah B <git@sarahduck.ca> | 2024-01-20 15:28:48 -0800 |
| commit | 163a2f1a1076d518b04ee37911bdd40afe8b9b2c (patch) | |
| tree | d28b56d5b0b43da21dab92e61f9967e303b7d063 /Bitmap.cs | |
| parent | 31d9168080e52738829b5575c66627e43a8bdc38 (diff) | |
Added finalizers
Diffstat (limited to 'Bitmap.cs')
| -rw-r--r-- | Bitmap.cs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -123,8 +123,15 @@ class Bitmap : IDisposable return SerializedData; } + bool disposed = false; + public void Dispose() { + if (disposed) return; Raylib.UnloadTexture(Texture); + GC.SuppressFinalize(this); + disposed = true; } + + ~Bitmap() => Dispose(); }
\ No newline at end of file |
