BlueFS::FileReader *h;
public:
BlueRocksSequentialFile(BlueFS *fs, BlueFS::FileReader *h) : fs(fs), h(h) {}
+ ~BlueRocksSequentialFile() {
+ delete h;
+ }
// Read up to "n" bytes from the file. "scratch[0..n-1]" may be
// written by this routine. Sets "*result" to the data that was
BlueFS::FileReader *h;
public:
BlueRocksRandomAccessFile(BlueFS *fs, BlueFS::FileReader *h) : fs(fs), h(h) {}
+ ~BlueRocksRandomAccessFile() {
+ delete h;
+ }
// Read up to "n" bytes from the file starting at "offset".
// "scratch[0..n-1]" may be written by this routine. Sets "*result"
BlueFS::FileWriter *h;
public:
BlueRocksWritableFile(BlueFS *fs, BlueFS::FileWriter *h) : fs(fs), h(h) {}
+ ~BlueRocksWritableFile() {
+ delete h;
+ }
// Indicates if the class makes use of unbuffered I/O
/*bool UseOSBuffer() const {
return err_to_status(r);
}
- delete h;
return rocksdb::Status::OK();
}
BlueFS *fs;
BlueFS::FileLock *lock;
BlueRocksFileLock(BlueFS *fs, BlueFS::FileLock *l) : fs(fs), lock(l) { }
+ ~BlueRocksFileLock() {
+ }
};
int r = fs->unlock_file(l->lock);
if (r < 0)
return err_to_status(r);
+ delete lock;
return rocksdb::Status::OK();
}