()
| 23 | } |
| 24 | |
| 25 | @Override |
| 26 | public void close() { |
| 27 | if (0 == _ptr) |
| 28 | throw new RuntimeException("Object already closed: " + getClass() + ", _ptr=" + _ptr); |
| 29 | else if (null == _cleanable) |
| 30 | throw new RuntimeException("Object is not managed in JVM, can't close(): " + getClass() + ", _ptr=" + _ptr); |
| 31 | else { |
| 32 | _cleanable.clean(); |
| 33 | _cleanable = null; |
| 34 | _ptr = 0; |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | public boolean isClosed() { |
| 39 | return _ptr == 0; |
nothing calls this directly
no outgoing calls
no test coverage detected