On 27 February 2017 at 00:23, Philipp Stephani
wrote:
>
> Elias MÃ¥rtenson 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.
>
Thank you. That seems reasonable, and I will do this.
Regards,
Elias