Examples: Fixed resource leaks warnings.

This commit is contained in:
bkaradzic 2013-10-06 20:30:44 -07:00
parent 5f35341abf
commit 781c9cda5b
3 changed files with 6 additions and 0 deletions

View file

@ -240,6 +240,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
bgfx::frame(); bgfx::frame();
} }
imguiDestroy();
free(bigText); free(bigText);
fontManager->destroyTtf(font); fontManager->destroyTtf(font);

View file

@ -535,6 +535,8 @@ int _main_(int /*_argc*/, char** /*_argv*/)
bgfx::frame(); bgfx::frame();
} }
imguiDestroy();
for (uint32_t ii = 0; ii < 3; ++ii) for (uint32_t ii = 0; ii < 3; ++ii)
{ {
mesh_top[ii].unload(); mesh_top[ii].unload();

View file

@ -309,6 +309,8 @@ Atlas::Atlas(uint16_t _textureSize, const uint8_t* _textureBuffer, uint16_t _reg
Atlas::~Atlas() Atlas::~Atlas()
{ {
bgfx::destroyTexture(m_textureHandle);
delete [] m_layers; delete [] m_layers;
delete [] m_regions; delete [] m_regions;
delete [] m_textureBuffer; delete [] m_textureBuffer;