Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- From: "Doug Harrison [MVP]" <dsh@xxxxxxxx>
- Date: Sun, 30 Mar 2008 13:13:23 -0500
On Sun, 30 Mar 2008 19:54:55 +0200, "h.wulff" <zuhause@xxxxxxx> wrote:
Doug Harrison [MVP] wrote:
When are the functions you mentioned, "erase(), clear() or remove()",
called?
When my shell extension is unloaded, in the destructor. And at this time
the scan thread has already done its work.
I take it then that the thread has exited, and you join with it by using:
WaitForSingleObject(hThread, INFINITE);
You also need to close the handle, of course.
I only use VS 2005 when developing/debugging my shell extension. But I
just saw that even at this time my shell extension isn't linked to
mfc*.dll or msvc*.dll. (According to Dependency Walker) So that should
be ok... ?
As long as you're statically linking to the CRT, and it sounds like you
are, you should be fine.
--
Doug Harrison
Visual C++ MVP
.
- Follow-Ups:
- References:
- Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- From: h.wulff
- Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- From: Doug Harrison [MVP]
- Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- From: h.wulff
- Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- Prev by Date: Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- Next by Date: Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- Previous by thread: Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- Next by thread: Re: Sharing a RO std::list between 2 threads & Crash in _Orphan_ptr()
- Index(es):
Relevant Pages
|