thanks for your feedback. Materials are internally represented by objects of class MaterialHelper and the allocation/deallocation stuff is handled by MaterialHelper, too. These memory leaks are already fixed in current SVN version.
Regarding Obj -> yes, this is definitely an awkward flaw. I'll sent it over to the guy who wrote the OBJ loader for Assimp.
Alex
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
thanks for your bug reports :-). I found the reason in the obj-loader and will fix this as soon as possible ( it can take a little time, so thanks for your patience ).
Kimmi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
aiMaterial.h 473
aiMaterial()
// Added by zhaolei joy @2009.04.21
{
mProperties=NULL;
}
public:
~aiMaterial()
{
if(mProperties)
{
int index;
for(index=0;index<mNumProperties;index++)
{
delete mProperties[index];
mProperties[index]=NULL;
}
delete [] mProperties;
mProperties=NULL;
}
}
===================================================
objfiledata.h line 304
~Model()
{
//Added by zhaolei @ 2009.04.02
{
std::map<std::string, Material*>::iterator it=m_MaterialMap.begin();
for(;it!=m_MaterialMap.end();it++)
{
if(it->first.compare(std::string("defaultmaterial"))!=0)
{
delete it->second;
it->second=NULL;
}
}
}
m_MaterialMap.clear();
int index;
for(index=0;index<m_Normals.size();index++)
{
delete m_Normals[index];
m_Normals[index]=NULL;
}
m_Normals.clear();
for(index=0;index<m_Vertices.size();index++)
{
delete m_Vertices[index];
m_Vertices[index]=NULL;
}
m_Vertices.clear();
for(index=0;index<m_TextureCoord.size();index++)
{
delete m_TextureCoord[index];
m_TextureCoord[index]=NULL;
}
m_TextureCoord.clear();
==========================================
Hi,
thanks for your feedback. Materials are internally represented by objects of class MaterialHelper and the allocation/deallocation stuff is handled by MaterialHelper, too. These memory leaks are already fixed in current SVN version.
Regarding Obj -> yes, this is definitely an awkward flaw. I'll sent it over to the guy who wrote the OBJ loader for Assimp.
Alex
okay, assimp will be better and beter ;-)
Hi,
thanks for your bug reports :-). I found the reason in the obj-loader and will fix this as soon as possible ( it can take a little time, so thanks for your patience ).
Kimmi