Closed CNLHC closed 2 years ago
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.
runtime.SetFinalizer
Free
Thanks
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 invokeFree
and avoid memory leaking in the above cases.