Why do you want to delete the folder? I want to be able to drop a dataset that I create
What exactly is the dataset you are using? When the dataset is created, I use TDBFactory.createDataset(), I've just been using the Dataset interface. How would I set up a StoredConnection? I realize that this does not work on Windows 64-bit. On Thu, Aug 8, 2013 at 10:34 AM, Andy Seaborne <[email protected]> wrote: > 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 > >
