Doing a Restart could still damage your USB in rare circumstances
Briefly the options when you get the message that the device is still in use are:
1. Log off your profile, unplug the device and then log on.
2. Start > Devices and Printers. Right click on the device, and click on eject. ( In the case of pendrives you can also right click on the device in (My) Computer and eject.)
3. Shut down your PC or wait till you shut down and then remove the device.
Use a program like Unlocker UNLOCKER 1.9.1 BY CEDRICK 'NITCH' COLLOMB
to kill all running processes and then remove your device. I Can't Eject This Flash Drive (or External Hard Drive) | PCWorld
Follow these procedures and you will not lose your sleep like this.