v0.3.12
Changelog
v0.3.12 (2026-08-19)
Browse the Repository | Released Assets
Fixed
- Interpreters, interpreter builders and the resources they borrow (the op resolver
and the flatbuffer model) now hold real references to each other. Previously only a
hand-rolled counter recorded the link, so the VM was free to collect a resource that
was still in use, and the destructor's decrement landed in whatever resource had been
given that memory next. On arm64 this brought down the emulator with SIGBUS. - Resources are no longer read uninitialised.
enif_alloc_resourcehands back raw
memory, so fields that looked initialised in the struct definition were not, and
NifResTfLiteTensorcould reachdeleteon a wild pointer. - Every
tflite::FlatBufferModeland everytflite::Interpreterwas leaked; both are
now released with the resource that owns them. - Creating an Edge TPU interpreter no longer leaks its resource when the interpreter
cannot be built or its tensors cannot be allocated. - Tensor resources are no longer leaked. Each one was created with a reference that
nobody ever gave back, on top of the one the interpreter's cache holds, so none of
them could be freed. Failing partway through reading a tensor leaked one as well. - Edge TPU context resources are no longer leaked, for the same reason: the reference
fromenif_alloc_resourcewas never released. allocate_tensorsno longer reportsunknown errorfor three of the statuses
TFLite can return. A model carrying ops the interpreter cannot resolve -- an Edge
TPU model given to a plain builtin resolver, say -- now saysUnresolvedOps
instead. The mapping lived in two places, one of which had drifted; there is now
only one.- The Edge TPU itself is handed back when nothing is using it any more. Contexts were
parked in a global map that was written to and never read, purely so their
shared_ptrcould not run out, which held the device until the VM exited. Each
context resource now owns its share directly, and an Edge TPU interpreter holds a
reference to the context it delegates to, so the device outlives every interpreter
built on it and is released once the last one is gone. - Platform-specific binaries now go to the consuming app's
_build/<target>_<env>/lib/tflite_beam/priv
instead ofdeps/tflite_beam/priv, so switchingMIX_TARGETno longer picks up
another target'stflite_beam.so.rm -rf deps/tflite_beamis no longer needed
when cross-compiling (#73). - Building from source no longer fails on hosts that have gflags installed
system-wide (e.g.brew install gflags). glog resolved gflags through
find_package, which picked up the system copy and collided with the targets
the bundled gflags had already defined.