add delete in thread.cpp,improved networkhelper