OsgRender.cpp: Do not set pointers to NULL on destructor
It provides no benefit to do so, since the object would be destroyed anyway and therefore it would be impossible to reuse these pointers. Doing so can only mask potential memory errors.
This commit is contained in:
parent
6d7088adf5
commit
559b2974d6
1 changed files with 1 additions and 14 deletions
|
@ -133,22 +133,9 @@ SDRender::~SDRender(void)
|
|||
m_Root->removeChildren(0, m_Root->getNumChildren());
|
||||
stateSet->getTextureAttributeList().clear();
|
||||
stateSet->getTextureModeList().clear();
|
||||
|
||||
m_CarRoot = NULL;
|
||||
m_CarLightsRoot = NULL;
|
||||
m_ShadowRoot = NULL;
|
||||
m_ShadowSlot = NULL;
|
||||
m_NonShadowRoot = NULL;
|
||||
m_Scene = NULL;
|
||||
m_Root = NULL;
|
||||
m_Fog = NULL;
|
||||
}
|
||||
|
||||
if (thesky)
|
||||
{
|
||||
delete thesky;
|
||||
thesky = NULL;
|
||||
}
|
||||
delete thesky;
|
||||
|
||||
SDTrack = NULL;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue