public void finalize() { if (fd >= 0) { LibC.close(fd); fd = -1; } }
public void dispose() { if (this.fd < 0) { return; } int fd = this.fd; this.fd = -1; int res = LibC.close(fd); if (0 == res) { return; } throw LibC.exception($"Error closing file descriptor { fd }", res); }
public void dispose() { if (this.fd < 0) { return; } int fd = this.fd; this.fd = -1; int res = LibC.close(fd); if (0 == res) { return; } throwError($"Error closing timer handle { fd }", res); }