mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 03:33:48 +00:00
destructor code+ removed a crash-causing redundancy in onRemove
This commit is contained in:
parent
727dbbfd8d
commit
c1bf59bf07
2 changed files with 15 additions and 3 deletions
|
|
@ -188,12 +188,24 @@ RenderProbeMgr::RenderProbeMgr(RenderInstType riType, F32 renderOrder, F32 proce
|
|||
{
|
||||
}
|
||||
|
||||
RenderProbeMgr::~RenderProbeMgr()
|
||||
{
|
||||
mLastShader = NULL;
|
||||
mLastConstants = NULL;
|
||||
|
||||
for (ProbeConstantMap::Iterator i = mConstantLookup.begin(); i != mConstantLookup.end(); i++)
|
||||
{
|
||||
if (i->value)
|
||||
SAFE_DELETE(i->value);
|
||||
}
|
||||
mConstantLookup.clear();
|
||||
}
|
||||
|
||||
void RenderProbeMgr::onRemove()
|
||||
{
|
||||
SAFE_DELETE(mLastConstants);
|
||||
|
||||
Parent::onRemove();
|
||||
}
|
||||
|
||||
void RenderProbeMgr::initPersistFields()
|
||||
{
|
||||
Parent::initPersistFields();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue