closes a MeshBuilder. There should be a close() for every open() and it's an error to let the graphics system get hold of a MeshBuilder that isn't closed properly. Alas, this is a hard error to catch since the missing close() by definition doesn't have a known stacktrace. Closing something that isn'
()
| 213 | openCount--; |
| 214 | if (openCount == 0) { |
| 215 | doClose(); |
| 216 | } |
| 217 | if (openCount < 0) { |
| 218 | throw new IllegalArgumentException("more closes than opens?"); |
| 219 | } |
| 220 | } |
| 221 | |
| 222 | private void doClose() { |
| 223 | target.setVertexLimit(vertexCursor); |
| 224 | target.setElementLimit(elementCursor); |
| 225 | } |
| 226 |
no test coverage detected