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[cgo]: Fix - memory allocted by cgo will not automaticlly free by gc. #96

Merged
merged 1 commit into from
Jul 31, 2022

Conversation

CNLHC
Copy link

@CNLHC CNLHC commented Jul 21, 2022

Currently, when an object containing a jieba instance is dropped, the memory allocated to jieba will not be freed automatically.

This Pull Request uses runtime.SetFinalizer to invoke Free and avoid memory leaking in the above cases.

@yanyiwu yanyiwu merged commit 4b465a2 into yanyiwu:master Jul 31, 2022
@yanyiwu
Copy link
Owner

yanyiwu commented Jul 31, 2022

Thanks

@CNLHC CNLHC mentioned this pull request Mar 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants