|
SILICON
|
Custom deleter used with std::unique_ptr for fstReaderContext. More...
#include <fstWrapper.hpp>
Public Member Functions | |
| void | operator() (fstReaderContext *ctx) const |
Custom deleter used with std::unique_ptr for fstReaderContext.
The libfst API is C-based and exposes manual lifetime management through fstReaderOpen()/fstReaderClose(). Wrapping the raw pointer in a unique_ptr with a custom deleter gives strict RAII semantics:
This completely eliminates accidental leaks and makes move semantics trivial.
Definition at line 46 of file fstWrapper.hpp.
|
inline |
Definition at line 47 of file fstWrapper.hpp.