it is the caller's responsibility to ensure that this is called per context. To do so, you can wrap all calls to this in GraphicsContext.preQueueInAllContexts(() -> ... and GraphicsContext.get(this, () -> ... )
()
| 71 | * GraphicsContext.preQueueInAllContexts(() -> ... and GraphicsContext.get(this, () -> ... ) |
| 72 | */ |
| 73 | protected abstract t_state setup(); |
| 74 | |
| 75 | public void finalize() { |
| 76 | GraphicsContext.postQueueInAllContexts(this::destroy); |