Skip to content

Commit 0726df2

Browse files
committed
Refactors subject disposal
Removes unnecessary disposal of lifecycle and navigation event subjects. The `DisposeWith` call was causing issues with subject lifetimes, leading to unexpected behavior. Removing it allows subjects to properly complete and prevents premature disposal.
1 parent b06689a commit 0726df2

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Stellar/ViewManager.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ public ViewManager()
5858
{
5959
_controlBindings = new(this);
6060

61-
_lifecycleEvents = new(() => new Subject<LifecycleEvent>().DisposeWith(_controlBindings), LazyThreadSafetyMode.ExecutionAndPublication);
62-
_navigationEvents = new(() => new Subject<NavigationEvent>().DisposeWith(_controlBindings), LazyThreadSafetyMode.ExecutionAndPublication);
61+
_lifecycleEvents = new(() => new Subject<LifecycleEvent>(), LazyThreadSafetyMode.ExecutionAndPublication);
62+
_navigationEvents = new(() => new Subject<NavigationEvent>(), LazyThreadSafetyMode.ExecutionAndPublication);
6363
}
6464

6565
public void Dispose()

0 commit comments

Comments
 (0)