It's safe, CCleaner will backup the registry for you then remove keys for non existent files and folders. It will display a list of what it is cleaning. almost everything you uninstall or delete leaves registry keys behind. With shared DLLs, refernces to them remian for programs and, places that no longer exist. It slows the computer down while it tries to find the working registry entry for what you are trying to do and, when it takes too long, the program (DAI in this case) crashes because the computer did not allow access to the DLL it needed.
I run a cleaner weekly, and after every uninstall to keep that junk to a minimum. I've used both Eusing's and CCleaner, they are comparable, just depends on the interface you like better. Both back up the registry and, have built in tools to restore an older registry if you ever need to do that, but I've never had to restore the registry, neither cleaner removes a key for a file or folder that still exists on your computer but, it does remove those for things that have been removed.
say the DLL is kernel.dll and, over the life of that computer, you've had 50 programs that need to use that dll but, only have 2 installed now. Well those other 48 keys are still there and, the computer has to sort through all of them whenever you use one of the two programs that actually do use the dll. One of those is fine with the wait, but DAI refuses to wait. (a bit simplified but that's the basics of it.) removing the 48 useless keys means only the two left for the computer to look at and, that takes one or two milliseconds , DAI is happy.
The firat time you clean a registry, there are likely to be thousands of items to be fixed, that's normal. Even weekly i get 200 to 300 because of deleted temporary files and such. Only installing and uninstalling programs affects the dll keys but, you can see how that can get to be a problem over time.