Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EMSUSD-251 - Release all refs held by session state on reset #3196

Merged

Conversation

JGamache-autodesk
Copy link
Collaborator

No description provided.

@@ -118,6 +118,7 @@ void MayaLayerEditorWindow::onClearUIOnSceneReset()
LayerTreeModel::suspendUsdNotices(true);
setCentralWidget(nullptr);
delete _layerEditor;
_sessionState.setStageEntry(UsdLayerEditor::SessionState::StageEntry{});
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The stage entry was holding a ref on the stage, which prevented it from being fully released on File->Open. If re-opening the same file or a file referencing the same stage, the leak caused any unsaved modifications to outlive the File->Open action.

@seando-adsk seando-adsk added the bug Something isn't working label Jul 5, 2023
@JGamache-autodesk JGamache-autodesk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 5, 2023
@JGamache-autodesk
Copy link
Collaborator Author

@seando-adsk ready for merge. Thanks!

@seando-adsk seando-adsk merged commit ce0e0cb into dev Jul 10, 2023
10 checks passed
@seando-adsk seando-adsk deleted the gamaj/EMSUSD-251/release_layer_editor_refs_on_open_and_new branch July 10, 2023 13:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants