Re: [Boost-users] Boost.Thread memory leak reported
Valgrind doesn't find it either. I have yet to try it with stack walker (was about to but xp blue screened so I took it as a sign)
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] On Behalf Of Elisha Berns Sent: Thursday, August 25, 2005 9:45 AM To: boost-users@lists.boost.org Subject: Re: [Boost-users] Boost.Thread memory leak reported
Right,
Those are the same project settings I'm using. The only difference is that my code is in a non-MFC class. I tested it with the VLD memory leak detector found on CodeProject and it also reports zero leaks.
Elisha
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
-----Original Message----- From: boost-users-bounces@lists.boost.org [mailto:boost-users-bounces@lists.boost.org] 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
On 8/25/05, Sohail Somani
wrote: problem? _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users
On 8/25/05, Sohail Somani
Valgrind doesn't find it either. I have yet to try it with stack walker (was about to but xp blue screened so I took it as a sign)
Isn't valgrind for linux? I think the problem might be on Windows machines, only. The functions new_critical_section() and delete_critical_section() should be called only on Windows machines, since they are calling Win32 functions.
participants (2)
-
Christian Henning
-
Sohail Somani