我的自建类中使用到DLL中的中的函数如下 mfunction=function getname:pchar;stdcall; Tmyclass=class
  m_device:Thandle;
  //这里实现加载dll中函数
 end; 
实现部份
 my:=tmyclass.create;
  my.m_device:=loadlibrary('test.dll');
  //这里运行刚才加载的DLL函数退出
 freelibrary(my.m_device); //不管在释放 自定义类之前还是之后释放动态库文件都会出错
 freeandnil(my);
 //freelibrary(my.m_device);像这种情况应该处理?难道只要释放类就行了吗?那之前连接dll不用释放了吗?