Android uses ADB to communicate with physical devices and emulators. To properly disconnect your phone first stop the ADB server and then eject your device.
CD C:\Users\\AppData\Local\Android\android-sdk\platform-tools
adb kill-server
Then eject your device.
More info here.