예제 #1
0
 public void finalize()
 {
     if (fd >= 0)
     {
         LibC.close(fd);
         fd = -1;
     }
 }
예제 #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);
        }
예제 #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);
        }