Skip to content

Commit

Permalink
unload engine in gzrenderer debugging
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Aug 17, 2023
1 parent b5e10a4 commit 6d9a940
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/plugins/minimal_scene/MinimalScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,14 @@ void GzRenderer::Destroy()
gzdbg << "Destroy scene [" << scene->Name() << "]" << std::endl;
engine->DestroyScene(scene);

scene.reset();
// TODO(anyone) If that was the last scene, terminate engine?
if (engine->SceneCount() == 0)
{
std::cerr << "terminating " << std::endl;
rendering::unloadEngine(engine->Name());
std::cerr << "terminated " << std::endl;
}
}

std::cerr << "================ GzRenderer Destroy " << std::endl;
Expand Down

0 comments on commit 6d9a940

Please sign in to comment.