We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In a single application life cycle I have a need to use multiple times fresh instance of persistence map to reduce pressure on memory.
val map = { persistent.Map[String, Int, Nothing, Glass](File.newTemporaryDirectory("suggestions_topn_").deleteOnExit().path) }
when the business operation is completed ( multiple map.put and one map.values.foreach ) persistent map is being closed using
map.put
map.values.foreach
map.close()
After multiple cycles memory is being occupied by swaydb.core.level.zero.LevelZeroMapCache that have root reference in scala.sys.ShutdownHookThread
swaydb.core.level.zero.LevelZeroMapCache
scala.sys.ShutdownHookThread
It is not clear from docs is something else e.g. map.delete should be called to clear references.
map.delete
The text was updated successfully, but these errors were encountered:
Calling map.close() should be enough. delete() simply calls close and then deletes all persisted file.
delete()
close
This sounds like a bug with the shutdown hook.
Thank you for reporting this.
Sorry, something went wrong.
No branches or pull requests
In a single application life cycle I have a need to use multiple times fresh instance of persistence map to reduce pressure on memory.
when the business operation is completed ( multiple
map.put
and onemap.values.foreach
) persistent map is being closed usingAfter multiple cycles memory is being occupied by
swaydb.core.level.zero.LevelZeroMapCache
that have root reference inscala.sys.ShutdownHookThread
It is not clear from docs is something else e.g.
map.delete
should be called to clear references.The text was updated successfully, but these errors were encountered: