Skip to content

fix: physics callback leaks when rebuilding scenario - #66

Open
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/extension-30e0cb2c
Open

fix: physics callback leaks when rebuilding scenario#66
andrewwhitecdw wants to merge 1 commit into
NVlabs:mainfrom
andrewwhitecdw:bugfix/extension-30e0cb2c

Conversation

@andrewwhitecdw

Copy link
Copy Markdown

This PR addresses the following issue in exts/omni.ext.mobility_gen/omni/ext/mobility_gen/extension.py: physics callback leaks when rebuilding scenario.

Changes

  • exts/omni.ext.mobility_gen/omni/ext/mobility_gen/extension.py: physics callback leaks when rebuilding scenario.

Details

Before:

    def clear_scenario(self):
        self.scenario = None
        self.cached_stage_path = None

After:

    def clear_scenario(self):
        world = get_world()
        if world is not None:
            try:
                world.remove_physics_callback("scenario_physics")
            except Exception:
                pass
        self.scenario = None
        self.cached_stage_path = None

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant