caesar0301 / treelib

An efficient implementation of tree data structure in python 2/3.
http://treelib.readthedocs.io/en/latest/
Other
801 stars 185 forks source link

the function remove_node delete dict won't release the memory #112

Open EvilPuddingLemon opened 5 years ago

EvilPuddingLemon commented 5 years ago

I hope you can realize a function that will release the memory, it will do me a favour in using treelib to build privacy preserved trie for big data while deleting node.

leonardbinet commented 4 years ago

@EvilPuddingLemon we can remove nodes from tree, but to completely release memory that's another story 😬 that's more a garbage collector issue.

Do you have a specific example on which we could benchmark?

I don't know your use case, but a solution might to serialize your tree in json and reload it in another python process (the new process would be clean). FYI json serialization is planned #85 for next release.