Esempio n. 1
0
 public void finalize()
 {
     if (fd >= 0)
     {
         LibC.close(fd);
         fd = -1;
     }
 }
Esempio n. 2
0
        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);
        }
Esempio n. 3
0
        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);
        }