Skip to content

v0.3.12

Choose a tag to compare

@github-actions github-actions released this 18 Aug 15:29
· 195 commits to main since this release

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_resource hands back raw
    memory, so fields that looked initialised in the struct definition were not, and
    NifResTfLiteTensor could reach delete on a wild pointer.
  • Every tflite::FlatBufferModel and every tflite::Interpreter was 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
    from enif_alloc_resource was never released.
  • allocate_tensors no longer reports unknown error for 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 says UnresolvedOps
    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_ptr could 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 of deps/tflite_beam/priv, so switching MIX_TARGET no longer picks up
    another target's tflite_beam.so. rm -rf deps/tflite_beam is 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.