add finalize() methods for WolfSSLCertManager and WolfSSLCertificate classes

pull/35/head
Chris Conlon 2020-03-06 17:32:09 -07:00
parent c697bc9dd9
commit 0d28f231c2
2 changed files with 24 additions and 0 deletions

View File

@ -87,4 +87,16 @@ public class WolfSSLCertManager {
/* free Java resources */
this.active = false;
}
@SuppressWarnings("deprecation")
@Override
protected void finalize() throws Throwable
{
if (this.active == true) {
/* free resources, set state */
this.free();
this.active = false;
}
super.finalize();
}
}

View File

@ -391,4 +391,16 @@ public class WolfSSLCertificate {
/* free Java resources */
this.active = false;
}
@SuppressWarnings("deprecation")
@Override
protected void finalize() throws Throwable
{
if (this.active == true) {
/* free resources, set state */
this.free();
this.active = false;
}
super.finalize();
}
}