mirror of
https://github.com/processing/processing4.git
synced 2026-02-12 10:00:42 +01:00
Clear the global PGL on dispose().
This commit is contained in:
@@ -651,9 +651,13 @@ public class PGraphicsOpenGL extends PGraphics {
|
||||
deleteFinalizedGLResources();
|
||||
|
||||
if (primarySurface) pgl.deleteSurface();
|
||||
// This next line is critical to release many static allocations.
|
||||
// This is important in the context of, say, a unit test suite, which
|
||||
// runs more than one OpenGL sketch within the same classloader
|
||||
// (as in the case of processing.py). Please don't remove it!
|
||||
pgl = null;
|
||||
}
|
||||
|
||||
// @Override
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user