GLInstancingRenderer::~GLInstancingRenderer() { delete m_data->m_shadowMap; glDeleteTextures(1,&m_data->m_shadowTexture); glDeleteTextures(1,&m_data->m_defaultTexturehandle); removeAllInstances(); sData2=0; if (m_data) { if (m_data->m_vbo) glDeleteBuffers(1,&m_data->m_vbo); } delete m_data; }
SystemClass::~SystemClass() { SystemClassRegistry::getInstance()->unregisterClass(this); removeAllInstances(); }