If I have this class with a subject that emits a single value during its life:
export class MyClass {
myEmitter$: Subject<void> = new Subject();
someMethod(){
this.myEmitter$.next();
this.myEmitter$.complete();
}
}
and then in another class:
this.instanceOfMyClass.myEmitter.subscribe();
Should I unsubscribe from instanceOfMyClass.myEmitter$
, given that the subject completes after emitting?