|
From: | Elias Mårtenson |
Subject: | Re: Module support: No environment in pointer release function |
Date: | Mon, 27 Feb 2017 12:31:33 +0800 |
Elias Mårtenson <address@hidden> schrieb am Fr., 10. Feb. 2017 um 06:21 Uhr:
Right now I simply call abort() if there is an error. Excessive, I know, but at least I know when there is a problem and the stack trace gives me all the answers I need.I'm not sure I should keep the abort() in the final version though.Probably not. You should either log (on stderr) and ignore the error, or not call gss_release_name (or any other function that can fail) in a finalizer.Just like they Java counterpart, finalizers can't fail. There's also no guarantee that they ever be called, or when they are called, so you shouldn't use them to implement cleanup that has to be deterministic or can fail.
[Prev in Thread] | Current Thread | [Next in Thread] |