SILICON
Loading...
Searching...
No Matches
ReaderDeleter Struct Reference

Custom deleter used with std::unique_ptr for fstReaderContext. More...

#include <fstWrapper.hpp>

Public Member Functions

void operator() (fstReaderContext *ctx) const

Detailed Description

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:

  • construction => resource acquired
  • destruction => resource released automatically

This completely eliminates accidental leaks and makes move semantics trivial.

Definition at line 46 of file fstWrapper.hpp.

Member Function Documentation

◆ operator()()

void operator() ( fstReaderContext * ctx) const
inline

Definition at line 47 of file fstWrapper.hpp.


The documentation for this struct was generated from the following file: