-// #[doc = " [dlclose(3)](http://man7.org/linux/man-pages/man3/dlclose.3.html)\n decrements the reference count for the given shared library (and\n any libraries brought in by that library's DT_NEEDED entries).\n\n If a library's reference count hits zero, it may be unloaded.\n Code that relies on this is not portable, and may not work on\n future versions of Android.\n\n dlclose() is dangerous because function pointers may or may not\n be rendered invalid, global data may or may not be rendered invalid,\n and memory may or may not leak. Code with global constructors is\n especially problematic. Instead of dlclose, prefer to leave the\n library open or, if cleanup is necessary, dlopen() the library in\n a child process which can later be killed by the parent or call\n exit() itself.\n\n Note also that dlclose() interacts badly with thread local variables\n with non-trivial destructors, with the\n (exact behavior varying by API level)[https://android.googlesource.com/platform/bionic/+/main/android-changes-for-ndk-developers.md#dlclose-interacts-badly-with-thread-local-variables-with-non_trivial-destructors].\n\n Returns 0 on success, and returns -1 on failure, in which case\n dlerror() can be used to retrieve the specific error."]
0 commit comments