From b5bf70cb809e85d066ef565996c0f03beeec89ad Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Thu, 9 Nov 2017 11:09:07 -0800 Subject: [PATCH] fix potential memory leak when manually loading a texture (pybullet.loadTexture), due to URDF/SDF texture caching (manually loading textures are not cached) --- examples/SharedMemory/TinyRendererVisualShapeConverter.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp b/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp index e9ca947c7..8274e0bc3 100644 --- a/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp +++ b/examples/SharedMemory/TinyRendererVisualShapeConverter.cpp @@ -1142,6 +1142,7 @@ int TinyRendererVisualShapeConverter::registerTexture(unsigned char* texels, int texData.m_width = width; texData.m_height = height; texData.textureData1 = texels; + texData.m_isCached = false; m_data->m_textures.push_back(texData); return m_data->m_textures.size()-1; }