Andy, With regard to your statement "This is a well-documented issue on MS Windows with memory mapped files (on Windows 64bit)". What are all the things that this could affect if one is running TDB on Windows 64bit? Is it only the deletion of underlying TDB files? Or are there other issues as well? During development I have deleted the files of a TDB database. But I did this when I had no software running against the TDB database.
It is my understanding that my single JVM is the only running process against the TDB database, that there is not a separate server processing running, which may continue to run after I have terminated my application process. Is that true? If one is not currently running a JVM using TDB on a particular TDB store, there should not be a problem with the deletion of the files, correct? -----Original Message----- From: Andy Seaborne [mailto:[email protected]] Sent: Thursday, August 08, 2013 11:35 AM To: [email protected] Subject: Re: Models remaining in memory On 08/08/13 14:59, Kurt Landen wrote: > I am currently using a method I made which just uses Apache FileUtils > to delete the folder containing my TDB, but if I add named models to > the Dataset, the models will still be accessible in memory even after > the physical models are gone. If I called addNamedModel it will tell > me the model already exists when I delete the TDB folder and re-create > it. How can I fix this? > Why do you want to delete the folder? What exactly is the dataset you are using? Deleting files behind TDB's back can only be done with great care. You must use StoredConnection.release() to expel it from the in-JVM cache. Then delete the files, then reopen it the database. Otherwise, the caches are still there and some of your data is still around. Eventually something will go wrong. Such data is not persistent. This does not work on Windows/64bit. This is a well-documented issue on MS Windows with memory mapped files. Andy
