mirror of
https://github.com/markjprice/cs11dotnet7.git
synced 2025-12-06 05:32:03 +01:00
Errata for page 275
This commit is contained in:
parent
802efa21b7
commit
62e3d9ed46
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
If you find any mistakes in the seventh edition, *C# 11 and .NET 7 - Modern Cross-Platform Development Fundamentals*, or if you have suggestions for improvements, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
[**Errata** (19 items)](errata.md): Typos, tool user interface changes, or mistakes in code that would cause a compilation error that prevents a successful build.
|
||||
[**Errata** (20 items)](errata.md): Typos, tool user interface changes, or mistakes in code that would cause a compilation error that prevents a successful build.
|
||||
|
||||
[**Improvements** (3 items)](improvements.md): Changes to text or code that would improve the content. These are optional.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
**Errata** (19 items)
|
||||
**Errata** (20 items)
|
||||
|
||||
If you find any mistakes, then please [raise an issue in this repository](https://github.com/markjprice/cs11dotnet7/issues) or email me at markjprice (at) gmail.com.
|
||||
|
||||
|
|
@ -14,6 +14,7 @@ If you find any mistakes, then please [raise an issue in this repository](https:
|
|||
- [Page 185 - Creating a class library that needs testing](#page-185---creating-a-class-library-that-needs-testing)
|
||||
- [Page 188 - Running unit tests using Visual Studio Code](#page-188---running-unit-tests-using-visual-studio-code)
|
||||
- [Page 244 - Init-only properties](#page-244---init-only-properties)
|
||||
- [Page 275 - Releasing unmanaged resources](#page-275---releasing-unmanaged-resources)
|
||||
- [Page 322 - Revealing the location of a type](#page-322---revealing-the-location-of-a-type)
|
||||
- [Page 330 - Publishing a self-contained app, Page 354 - Exercise 7.3 – Explore PowerShell](#page-330---publishing-a-self-contained-app-page-354---exercise-73--explore-powershell)
|
||||
- [Page 412 - Compressing streams](#page-412---compressing-streams)
|
||||
|
|
@ -140,6 +141,14 @@ In Step 1, the project name `CalculatorLibUnitTest` should be `CalculatorLibUnit
|
|||
|
||||
In Step 1, I say to add a new file named `Records.cs` to the `PacktLibraryNetStandard2` project/folder. I should have said to the `PacktLibraryModern` project/folder.
|
||||
|
||||
# Page 275 - Releasing unmanaged resources
|
||||
|
||||
> Thanks to `Wuu#0348` on the Packt Discord channels for raising this issue.
|
||||
|
||||
In the second bullet point after the large code block, I wrote, "It needs to check the `disposing` parameter and `disposed` field because if the finalizer thread has already run and it called the `~ObjectWithUnmanagedResources` method, then only unmanaged resources need to be deallocated." I should have written **managed** not **unmanaged**.
|
||||
|
||||
It might be clearer if I wrote, "It needs to check the `disposing` parameter and `disposed` field because if the finalizer thread has already run and it called the `~ObjectWithUnmanagedResources` method, then unmanaged resources will already have been deallocated and only managed resources remain to be deallocated by the garbage collector." I will do this in the next edition.
|
||||
|
||||
# Page 322 - Revealing the location of a type
|
||||
|
||||
> Thanks to Bob Molloy for raising this issue via email.
|
||||
|
|
|
|||
Loading…
Reference in a new issue