eclipse / mraa

Linux Library for low speed IO Communication in C with bindings for C++, Python, Node.js & Java. Supports generic io platforms, as well as Intel Edison, Intel Joule, Raspberry Pi and many more.
http://mraa.io
MIT License
1.36k stars 613 forks source link

api: Add explicit close methods to classes #1068

Closed jan-kiszka closed 3 years ago

jan-kiszka commented 3 years ago

This is needed for bindings to languages which perform implicit and lazy object cleanups. The explicit close methods allow to release resources when they are no longer required, permitting deterministic reuse. One example is node-red-node-intel-gpio which will use the new calls on node closing.

Fixes #1044.