Shutdown: clear effects cleanly.
Avoids effects (and referenced properties / objects within) persisting due to references in the effects cache, after globals are gone.
This commit is contained in:
parent
93dff17649
commit
5d8fa03090
1 changed files with 3 additions and 0 deletions
|
@ -37,6 +37,7 @@
|
|||
#include <simgear/canvas/VGInitOperation.hxx>
|
||||
#include <simgear/scene/model/modellib.hxx>
|
||||
#include <simgear/scene/material/matlib.hxx>
|
||||
#include <simgear/scene/material/Effect.hxx>
|
||||
#include <simgear/props/AtomicChangeListener.hxx>
|
||||
#include <simgear/props/props.hxx>
|
||||
#include <simgear/timing/sg_time.hxx>
|
||||
|
@ -433,6 +434,8 @@ int fgMainInit( int argc, char **argv ) {
|
|||
frame_signal.clear();
|
||||
fgOSCloseWindow();
|
||||
|
||||
simgear::clearEffectCache();
|
||||
|
||||
// clean up here; ensure we null globals to avoid
|
||||
// confusing the atexit() handler
|
||||
delete globals;
|
||||
|
|
Loading…
Add table
Reference in a new issue