mirror of https://github.com/buggins/dlangui.git
get rid from 'Non-zero DrawBuf instance count when exiting: 1' message
This commit is contained in:
parent
4b7fa25579
commit
1ca3ea4b27
|
|
@ -305,6 +305,13 @@ void initGLCaches() {
|
||||||
glGlyphCache = new GLGlyphCache;
|
glGlyphCache = new GLGlyphCache;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void destroyGLCaches() {
|
||||||
|
if (glImageCache)
|
||||||
|
destroy(glImageCache);
|
||||||
|
if (glGlyphCache)
|
||||||
|
destroy(glGlyphCache);
|
||||||
|
}
|
||||||
|
|
||||||
private abstract class GLCache
|
private abstract class GLCache
|
||||||
{
|
{
|
||||||
static class GLCacheItem
|
static class GLCacheItem
|
||||||
|
|
|
||||||
|
|
@ -386,6 +386,10 @@ extern (C) void releaseResourcesOnAppExit() {
|
||||||
imageCache = null;
|
imageCache = null;
|
||||||
}
|
}
|
||||||
FontManager.instance = null;
|
FontManager.instance = null;
|
||||||
|
static if (ENABLE_OPENGL) {
|
||||||
|
import dlangui.graphics.gldrawbuf;
|
||||||
|
destroyGLCaches();
|
||||||
|
}
|
||||||
|
|
||||||
debug {
|
debug {
|
||||||
if (DrawBuf.instanceCount > 0) {
|
if (DrawBuf.instanceCount > 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue