阅读背景:

如何在取消工作线程中的操作时防止内存泄漏?

来源:互联网 

Currently i am working on a desktop application which consists mathematical analysiss.I am using qt for GUI and project written in c++. When user starts an analysis, i open a worker thread and start a progress bar.Everything is ok up to now, problem starts when user cancels operation.Operation is complex, i am using several functions and objects, i allocate/deallocate memory at several times.I want to learn what should i do for recovering in cancel operation.Because there can be memory leaks.Which pattern or method i should use to be robust and safe for cancelling operation?Currently i am working on a desktop application




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: