0
我正在使用dlopen(NULL)
獲取可執行文件主模塊的句柄,如下所示。在由dlopen返回的句柄上調用dlclose(NULL)
void *handle = dlopen(NULL, RTLD_NOW);
我是否應該調用dlclose(handle)
將ref-count遞減到主模塊?
我正在使用dlopen(NULL)
獲取可執行文件主模塊的句柄,如下所示。在由dlopen返回的句柄上調用dlclose(NULL)
void *handle = dlopen(NULL, RTLD_NOW);
我是否應該調用dlclose(handle)
將ref-count遞減到主模塊?
從手冊頁:
dlclose()
The function dlclose() decrements the reference count on the dynamic
library handle handle. If the reference count drops to zero and no
other loaded libraries use symbols in it, then the dynamic library is
unloaded.
芹苴我敢打賭,這是空操作,當你調用它的「主」處理