MCPcopy Create free account
hub / github.com/clMathLibraries/clSPARSE / FreeSharedLibrary

Function FreeSharedLibrary

src/include/loadDynamicLibrary.hpp:85–100  ·  view source on GitHub ↗

! * \brief Release the handle to the dynamic library * \details Calls platform specific code to release the handle to a dynamic library * \param[in,out] libHandle Platform handle to the dynamic library, NULL'd on output * * \returns If the function succeeds, return value is nonzero. If the function fails, return value is zero. * */

Source from the content-addressed store, hash-verified

83*
84*/
85inline int FreeSharedLibrary(void*& libHandle)
86{
87 int result = 0;
88
89#if defined( _WIN32 )
90 if (libHandle != 0)
91 result = ::FreeLibrary(reinterpret_cast<HMODULE>(libHandle));
92#else
93 if( libHandle != 0 )
94 result = ( ::dlclose( libHandle ) == 0 );
95#endif
96
97 libHandle = NULL;
98
99 return result;
100}
101
102/*!
103 * \brief Query for function pointer in library

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected