From f78a18c9b7cc5e835caa769992602aafc741f6ba Mon Sep 17 00:00:00 2001 From: bkaradzic Date: Mon, 28 Jan 2013 22:08:16 -0800 Subject: [PATCH] Fixed resource leaks in examples. --- examples/06-bump/bump.cpp | 2 ++ examples/08-update/update.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/examples/06-bump/bump.cpp b/examples/06-bump/bump.cpp index b83d7d4b..ac672674 100644 --- a/examples/06-bump/bump.cpp +++ b/examples/06-bump/bump.cpp @@ -469,6 +469,8 @@ int _main_(int _argc, char** _argv) bgfx::destroyTexture(textureNormal); bgfx::destroyUniform(u_texColor); bgfx::destroyUniform(u_texNormal); + bgfx::destroyUniform(u_lightPosRadius); + bgfx::destroyUniform(u_lightRgbInnerR); // Shutdown bgfx. bgfx::shutdown(); diff --git a/examples/08-update/update.cpp b/examples/08-update/update.cpp index 6a8d662b..f065013b 100644 --- a/examples/08-update/update.cpp +++ b/examples/08-update/update.cpp @@ -335,6 +335,8 @@ int _main_(int _argc, char** _argv) bgfx::destroyIndexBuffer(ibh); bgfx::destroyVertexBuffer(vbh); bgfx::destroyProgram(program); + bgfx::destroyTexture(textureCube); + bgfx::destroyUniform(u_texCube); // Shutdown bgfx. bgfx::shutdown();