InterviewSolution
| 1. |
How Do I Get Deterministic Finalization In C#? |
|
Answer» In a garbage collected environment, it's impossible to GET true determinism. However, a design pattern that we recommend is implementing IDisposable on any CLASS that contains a critical resource. Whenever this class is consumed, it MAY be placed in a using STATEMENT, as shown in the following example: In a garbage collected environment, it's impossible to get true determinism. However, a design pattern that we recommend is implementing IDisposable on any class that contains a critical resource. Whenever this class is consumed, it may be placed in a using statement, as shown in the following example: |
|