Add proper cleanup override to complete the EventEmitter memory leak fix
This ensures the nested ToolPermissionService EventEmitter is properly cleaned up when ModeService is disposed, addressing the root cause rather than just suppressing the warning.
This commit is contained in:
parent
5c4f210496
commit
5933b8121f
1 changed files with 8 additions and 0 deletions
|
|
@ -111,6 +111,14 @@ export class ModeService extends BaseService<ModeServiceState> {
|
|||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Override cleanup to properly clean up nested ToolPermissionService
|
||||
*/
|
||||
override async cleanup(): Promise<void> {
|
||||
await this.currentState.toolPermissionService.cleanup();
|
||||
await super.cleanup();
|
||||
}
|
||||
|
||||
/**
|
||||
* Override isReady since this is a singleton with immediate availability
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue