QLibrary mylib("aaa.dll");
if (mylib.load())
{
//创建一个dll对象,将其放入一个窗口中
}
当我关闭窗口的时候,如何释放dll呢?
ps:当我load两次dll的时候,关闭窗口时,就会报错:“Unhandled exception at 0x02938c13 in XXX.exe: 0xC0000005: Access violation reading location 0xfeeefefa.”
求高手,求解释,求解决。。。。
------解决方案--------------------
bool QLibrary::unload ()
Unloads the library and returns true if the library could be unloaded; otherwise returns false.
This happens automatically on application termination, so you shouldn't normally need to call this function.
If other instances of QLibrary are using the same library, the call will fail, and unloading will only happen when every instance has called unload().
Note that on Mac OS X 10.3 (Panther), dynamic libraries cannot be unloaded.