8000 feat: Fix NotificationCenter Issue for ODPManager by mikechu-optimizely · Pull Request #324 · optimizely/csharp-sdk · GitHub
[go: up one dir, main page]

Skip to content

feat: Fix NotificationCenter Issue for ODPManager #324

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

Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Modify NCR Dispose
  • Loading branch information
mikechu-optimizely committed Jan 12, 2023
commit f64ca5558cfcaa4c3d080e8ddb2ed880901745f7
11 changes: 9 additions & 2 deletions OptimizelySDK/Optimizely.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1493,9 +1493,16 @@ public void Dispose()

Disposed = true;

NotificationCenterRegistry.RemoveNotificationCenter(ProjectConfigManager.SdkKey);
if (ProjectConfigManager is IDisposable)
{
NotificationCenterRegistry.GetNotificationCenter(ProjectConfigManager.SdkKey).
RemoveNotification(NotificationCenter.NotificationId);

NotificationCenterRegistry.RemoveNotificationCenter(ProjectConfigManager.SdkKey);

(ProjectConfigManager as IDisposable)?.Dispose();
}

(ProjectConfigManager as IDisposable)?.Dispose();
(EventProcessor as IDisposable)?.Dispose();

ProjectConfigManager = null;
Expand Down
0