Skip to content
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

fix(lifecycle): create multi-instances at the same time (#660) #663

Merged
merged 1 commit into from
Dec 16, 2023

Conversation

qwqcode
Copy link
Member

@qwqcode qwqcode commented Dec 16, 2023

No description provided.

@qwqcode qwqcode merged commit c9ea8f6 into master Dec 16, 2023
1 of 6 checks passed
@qwqcode qwqcode deleted the fix/lifecycle branch December 16, 2023 17:16
qwqcode added a commit that referenced this pull request Dec 16, 2023
BREAKING CHANGE: The following top-level methods, such as `Artalk.update`, `Artalk.reload`, and `Artalk.destroy`, have been removed. These methods now require invocation on an instance created by Artalk.init or new Artalk. This change was made to support creating multiple instances simultaneously, adapting to use cases where Vue components are referenced in different pages at the same time. Previously, only a single instance was allowed to prevent memory leak issues, which was insufficient for scenarios like caching multiple component instances using keep-alive. To better accommodate more complex SPA application scenarios, the decision was made to allow the creation of multiple independent instances. Remember to manually invoke the `artalk.destroy` method when releasing components to prevent memory leaks. (#660)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant