get rid from 'Non-zero DrawBuf instance count when exiting: 1' message

This commit is contained in:
gazer 2017-06-08 02:22:15 +03:00
parent 4b7fa25579
commit 1ca3ea4b27
2 changed files with 11 additions and 0 deletions

View File

@ -305,6 +305,13 @@ void initGLCaches() {
glGlyphCache = new GLGlyphCache;
}
void destroyGLCaches() {
if (glImageCache)
destroy(glImageCache);
if (glGlyphCache)
destroy(glGlyphCache);
}
private abstract class GLCache
{
static class GLCacheItem

View File

@ -386,6 +386,10 @@ extern (C) void releaseResourcesOnAppExit() {
imageCache = null;
}
FontManager.instance = null;
static if (ENABLE_OPENGL) {
import dlangui.graphics.gldrawbuf;
destroyGLCaches();
}
debug {
if (DrawBuf.instanceCount > 0) {