rvesse commented on issue #1846:
URL: https://github.com/apache/jena/issues/1846#issuecomment-1514390496

   Could you elucidate your use case more clearly?  It's not clear that there 
is actually any real issue here other than some IDE/code-scanning tool gave you 
a warning about a resource leak which as others have already said is sometimes 
by design in libraries like Jena
   
   TDB databases are typically used as long lived resources (since they are 
persistent databases) for the life of a process.  Opening and closing many of 
them within a single process usually only happens for unit testing purposes and 
suggests your use case may not align with the intended use cases of the TDB API.
   
   Jena also provides short-lived fully in-memory databases that can be used as 
an alternative to TDB.  TDB itself even has a fully in-memory mode i.e. 
non-persistent database that could be used if persistence is not required.
   
   One other possibility if the memory footprint of TDB is a concern is to 
spawn separate Fuseki processes that hosts the TDB database and communicate 
with it via HTTP.  You can then kill off the child process when the database is 
no longer needed


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to