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

Fix Tf_RegistryManagerImpl singleton instance not being deleted #3133

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion pxr/base/tf/registryManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ class Tf_RegistryManagerImpl {
return TfSingleton<Tf_RegistryManagerImpl>::GetInstance();
}

static void DeleteInstance() {
TfSingleton<Tf_RegistryManagerImpl>::DeleteInstance();
}

/// Stores the active library's registration functions and runs those
/// that are subscribed to then makes no library active. Returns an
/// identifier that can be passed to \c UnloadLibrary().
Expand Down Expand Up @@ -548,7 +552,10 @@ TfRegistryManager::TfRegistryManager()

TfRegistryManager::~TfRegistryManager()
{
// Do nothing
// Delete the actual instance.
// If we get here, then this instance is being deleted, which means nobody
// can use TfRegistryManager any more.
Tf_RegistryManagerImpl::DeleteInstance();
}

TfRegistryManager&
Expand Down
Loading