The Python bindings use libnvme_get_host() and libnvme_get_subsystem() to obtain C objects representing a host or subsystem. The problem is that the lifetime of the Python objects and the underlying C objects is not coupled.
libnvme was originally designed with the assumption that it would not be used by long-running processes. However, current use cases are pushing the library into new domains, such as long-running applications that keep object references alive.
This makes it necessary for the public API to track object lifetimes.
The simplest solution is probably reference counting.
The Python bindings use
libnvme_get_host()andlibnvme_get_subsystem()to obtain C objects representing a host or subsystem. The problem is that the lifetime of the Python objects and the underlying C objects is not coupled.libnvme was originally designed with the assumption that it would not be used by long-running processes. However, current use cases are pushing the library into new domains, such as long-running applications that keep object references alive.
This makes it necessary for the public API to track object lifetimes.
The simplest solution is probably reference counting.