fusesource / leveldbjni

A Java Native Interface to LevelDB
BSD 3-Clause "New" or "Revised" License
538 stars 144 forks source link

how to release the lock #24

Closed weejulius closed 11 years ago

weejulius commented 11 years ago

Hi,

I am using leveldbjni with clojure, and open a levedb with a specific directory, and then if I open the leveldb again without restart, it will prevent me from opening the db, says that the db is held by process no matter I repair or destroy the levedb for that directory.

Any suggestion to release the lock and open the db again?

Thanks

Julius

chirino commented 11 years ago

Did you close it?

weejulius commented 11 years ago

No, if I close it, it will not happen, Need I use try finaly block for every operation to take care the resources ? it seems it will impact the performance with lots of close.

chirino commented 11 years ago

Keep in mind that if you don't, you will leak native memory resources. That could impact your performance even more.