Fixed the memory leak of COM objects.