fix potential memory leak when manually loading a texture (pybullet.loadTexture), due to URDF/SDF texture caching (manually loading textures are not cached)
This commit is contained in:
@@ -1142,6 +1142,7 @@ int TinyRendererVisualShapeConverter::registerTexture(unsigned char* texels, int
|
|||||||
texData.m_width = width;
|
texData.m_width = width;
|
||||||
texData.m_height = height;
|
texData.m_height = height;
|
||||||
texData.textureData1 = texels;
|
texData.textureData1 = texels;
|
||||||
|
texData.m_isCached = false;
|
||||||
m_data->m_textures.push_back(texData);
|
m_data->m_textures.push_back(texData);
|
||||||
return m_data->m_textures.size()-1;
|
return m_data->m_textures.size()-1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user