-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wolftpm C# wrapper needs to implement IDisposable instead of using Finalizer. #221
Comments
Hi @zhichao-h , great suggestion! I will get a PR put up tomorrow fixing the way the classes are finalized. |
dgarske
added a commit
to dgarske/wolfTPM
that referenced
this issue
Jul 12, 2022
…aged resources (see wolfSSL#221)
dgarske
added a commit
to dgarske/wolfTPM
that referenced
this issue
Jul 12, 2022
…aged resources (see wolfSSL#221)
dgarske
added a commit
to dgarske/wolfTPM
that referenced
this issue
Jul 12, 2022
…aged resources (see wolfSSL#221)
dgarske
added a commit
to dgarske/wolfTPM
that referenced
this issue
Jul 13, 2022
…aged resources (see wolfSSL#221)
Fixed in #225. Marking closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the wolfTPM.cs, when cleaning up resources, the C# Finalizer are used instead of following the IDisposable. This can be dangerous as the resources are only cleaned up when the finalizers are run by the GC (hopefully). In many cases, the finalizer may never run as such resource leak will ensure.
The following classes should implement IDisposable:
The text was updated successfully, but these errors were encountered: