Boost logo

Boost Users :

From: Christian Henning (chhenning_at_[hidden])
Date: 2005-08-25 11:15:26


I got exactly the same error. Here is how I did it:

I created a project of a MFC Application inside VC7.1 . The wizards
creates the usual document/view classes. Inside the document class I
placed, like Elisha, a mutex. Inside the OnNewDocument() function I
put the code from Elisha:

BOOL CMFCTestDoc::OnNewDocument()
{
        if (!CDocument::OnNewDocument())
                return FALSE;

        // TODO: add reinitialization code here
        // (SDI documents will reuse this document)

   boost::thread indexer(
               boost::bind(&CMFCTestDoc::run, this));

       boost::mutex::scoped_lock lock(m_orphan_annotation_mutex);

       indexer.join();

        return TRUE;
}

I'm using MFC in a Shared DLL and Multithreaded Debug DLL runtime libs.

I can send the project files to anyone that is interessted.

By the way, if I use Purify to track down the leaks, it cannot find them.

Regards,
Christian

On 8/25/05, Sohail Somani <s.somani_at_[hidden]> wrote:
> > -----Original Message-----
> > From: boost-users-bounces_at_[hidden]
> > [mailto:boost-users-bounces_at_[hidden]] On Behalf Of Elisha Berns
> > Sent: Wednesday, August 24, 2005 8:48 PM
> > To: Boost
> > Subject: [Boost-users] Boost.Thread memory leak reported
> >
> >
> >
> > Detected memory leaks!
> > Dumping objects ->
> > {146} normal block at 0x00227008, 24 bytes long.
> > Data: < | > 08 7C 04 00 FF FF FF FF 00 00 00 00 00 00 00
> > 00
> > {145} normal block at 0x00223928, 8 bytes long.
> > Data: < p" > 08 70 22 00 01 CD CD CD
> > Object dump complete.
>
> Hi Elisha,
>
> Could you come up with a small test case that demonstrates the problem?
>
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net