We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e13c47 commit f71716dCopy full SHA for f71716d
1 file changed
src/extension.ts
@@ -735,6 +735,8 @@ export async function disposeAll(disposables: IDisposable[]): Promise<void> {
735
736
export async function deactivate(context: ExtensionContext) {
737
await disposeAll(context.subscriptions);
738
- context.subscriptions.length = 0; // Clear subscriptions to prevent memory leaks
+ if (context.subscriptions?.length) {
739
+ context.subscriptions.length = 0; // Clear subscriptions to prevent memory leaks
740
+ }
741
traceInfo('Python Environments extension deactivated.');
742
}
0 commit comments