Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
7900b43
Image<TPixel>.Frames now properly throws ObjectDisposedException afte…
May 13, 2021
d48b152
Image<TPixel> private methods no longer check if object was disposed …
May 13, 2021
7029b2f
Image<TPixel> private property PixelSource no longer checks if object…
May 13, 2021
1c45c1a
Removed GC.SuppressFinalize(this) from Image.Dispose() due to it not …
May 13, 2021
095ce41
Added tests for issue#1628
May 13, 2021
acf9d85
Moved dispose control logic to base Image class
May 13, 2021
8ec1013
Removed redundant flag from Image.Dispose(bool) call
May 13, 2021
ff4b269
Removed invalid tests
May 13, 2021
cbca565
ImageFrameCollection now properly implements IDisposable interface & …
May 14, 2021
127e9dd
All ImageFrameCollection<TPixel> public properties & method now check…
May 14, 2021
3f8bd3d
Added internal accessor for root frame
May 14, 2021
009e935
Added tests for issues#1628
May 14, 2021
f0f0c08
Fixed couple of invalid tests for ImageFrameCollection<TPixel>
May 14, 2021
a71ce19
ImageFrameCollection.Contains first checks if it was disposed first
May 14, 2021
f561053
Fixed a couple of failing tests
May 14, 2021
34706fb
Merge branch 'master' into image-disposed-fix
JimBobSquarePants May 18, 2021
1c8dcef
Renamed private Image<TPixel>.PixelSourse to PixelSourceUnsafe
May 21, 2021
e787ffa
Implemented dispose method according to common convention.
May 21, 2021
d54ff0e
Fixed disposable resouce leak in unit test.
May 21, 2021
5704403
Implemented ThrowObjectDisposedException for the ThrowHelper, replace…
May 21, 2021
65808ae
Fix throwhelper
JimBobSquarePants Jun 2, 2021
5d2884e
Merge branch 'master' into pr/1629
JimBobSquarePants Jun 2, 2021
afee881
Make frames resonly
JimBobSquarePants Jun 2, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Removed GC.SuppressFinalize(this) from Image.Dispose() due to it not …
…having a Finalization method
  • Loading branch information
Dmitry Pentin committed May 13, 2021
commit 1c45c1a7055a90af8bcb288140422eaa7db405ba
6 changes: 1 addition & 5 deletions src/ImageSharp/Image.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,7 @@ internal Image(
Configuration IConfigurationProvider.Configuration => this.configuration;

/// <inheritdoc />
public void Dispose()
{
this.Dispose(true);
GC.SuppressFinalize(this);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We shouldn't be removing the finalizer suppression in the base class.

https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/implementing-dispose#the-dispose-method

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't know SuppressFinalize do nothing if type has no finalizer, thanks!

}
public void Dispose() => this.Dispose(true);

/// <summary>
/// Saves the image to the given stream using the given image encoder.
Expand Down