It’s easy to add a little CD/DVD eject button to the menubar. But remember that anytime a CD or DVD is in use by OS X, it won’t eject right away. So be sure you’re not doing anything that is using the CD or DVD when you try to eject it.
To add the button, go to your Hard Drive and find the System Folder. Go to the Library folder inside that, then to the CoreServices folder, and then the Menu Extras folder.
Inside, find the icon titled eject.menu and double-click it. An eject button will appear in your menu bar. That will be an easier way to eject a CD or a DVD, and while it won’t work all the time, it’s handier than restarting.
If you decide that you don’t want the eject button in the menu bar, just hold down the command key and drag it off the bar and it will disappear.
Another option is a free utility called Ejector, which also puts an eject button in the menu bar, and it will also eject disk images on the desk top as well as CDs and DVDs in the drive. Get it at Jeb-Soft: Ejector.