I think I see what the issue is. The call you are making returns the result via a dispatch pointer. mIRC preserves this so that you can access it with $com().result. However, mIRC does not free it because in the past this caused mIRC to crash due to that pointer being later used by the scripter. There is currently no way for mIRC to know that this has happened. I can't remember all the ways scripters use the $com().result value. Have you used that in the past, if it was a dispatch pointer, to create a new COM object?