试了在好多地方release,发现都无法release,特来请教。 release方法用官方问答中建议的方法,发现init成功之后,不管在哪里release都不能成功。 1、主线程中去release 2、工作线程去release,没有init成功的话,没有问题,init成功的话,这个线程就不执行下去了。 3、Traderspi.cpp里去release也不行。 基本都是输出"RegisterSpi(NULL) done"之后就没有任何东西了。 Code: if (pTraderUserApi) { cout<<"go to RegisterSpi(NULL)"<<endl; pTraderUserApi->RegisterSpi(NULL); cout<<"RegisterSpi(NULL) done"<<endl; pTraderUserApi->Release(); cout<<"Release API done"<<endl; pTraderUserApi = NULL; cout<<"Api NULL"<<endl; } if (pUserSpi) { delete pUserSpi; pUserSpi = NULL; cout<<"Spi NULL"<<endl; }
用 Join 就在 Join()那里卡住, 是不是跟没有正常Logout有关? 之前发的 ReqUserLogout, 得到响应是OnRspError: errorid=1, errormsg=Unrecognized ftd tid 除了程序退出, 都不知道怎么正常断开了?