
23 Sep
2010
23 Sep
'10
9:18 a.m.
On 2010-09-23 10:51, Daniele Barzotti wrote:
Hi,
In my code I have a io_Service and a work object shared among my classes:
[snip]
When my application ends and the io_service.run() returns I get:
First-chance exception at 0x09299c18 (AxEuroATLib_debug.dll) in EuroSvr.exe: 0xC0000005: Access violation reading location 0xf0f0f0fc.
at the following line (io_service.ipp):
inline io_service::work::~work() { io_service_.impl_.work_finished(); }
I wrong something?
Regards, Daniele
Besides a possible race in your statement thread_started = !thread_started; and some other bad stuff such as memory leaks when throwing an exception, I don't see where the destructor of the work object is called. Could you provide the code involved? Rutger