()
| 141 | } |
| 142 | |
| 143 | void inc() { |
| 144 | // Count how many times this ref's Java object is passed to Go. |
| 145 | if (refcnt == Integer.MAX_VALUE) { |
| 146 | throw new RuntimeException("refnum " + refnum + " overflow"); |
| 147 | } |
| 148 | refcnt++; |
| 149 | } |
| 150 | } |
| 151 | |
| 152 | static final RefTracker tracker = new RefTracker(); |