The above link is a workaround, not a solution. Using that program should not be necessary.
I also vaguely recall noticing this when making a COM DLL some time ago as well, but since I have limited experience with Windows' COM DLL registration, I didn't think much of it. The fact that the file cannot be deleted leads me to believe that mIRC is not properly unloading or unregistering the COM DLL from Windows. I'm not sure which is the case.
I say all of this, because, assuming nothing else has an open handle to the file, this may even be a bug in mIRC. I'd personally expect that unregistering a COM DLL would not hold onto the file any longer in memory, Windows or otherwise.. And considering you can delete it when mIRC exits, I'm guessing Windows isn't the culprit.
Can you verify that nothing else is making use of your DLL at that time (make sure visual studio is closed) and show some steps to reproduce this? This may be useful to file a bug report and get this solved the *right* way. Also, if anyone knows why this may occur, please chime in.