c# - Android Debug Bridge won't stop -
i have winform app built using xamarin on vs2015 uses adb detect android device connection. works fine, when close software, adb thread won't stop if there stop in form_closing event, program stays in memory forever. in vs debugger, culprit threads shows "device list monitor", name of thread still running. how can fix this?
here's code:
androiddebugbridge m_adb; in form_load: string s = directory.getcurrentdirectory(); s = s + "\adb.exe"; m_adb = androiddebugbridge.createbridge(s, true); m_adb.deviceconnected += this.madb_deviceconnected; m_adb.devicedisconnected += this.madb_devicedisconnected; ; m_adb.start(); in form_closing:
m_adb.stop(); m_adb = null; thanks time , help
madb.stop() closes adb client connection. other process see adb server. kill need use madb.stopadb()
Comments
Post a Comment