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;
|
||||
}
|
||||
|
||||
void destroyGLCaches() {
|
||||
if (glImageCache)
|
||||
destroy(glImageCache);
|
||||
if (glGlyphCache)
|
||||
destroy(glGlyphCache);
|
||||
}
|
||||
|
||||
private abstract class GLCache
|
||||
{
|
||||
static class GLCacheItem
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue