$include_dir="/home/hyper-archives/boost-users/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [Boost-users] [Q] scoped_ptr for forward declared classes
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-03-31 13:33:06
V S P:
> and still trying to debug why shared_ptr reports mem leaks with Visual
> Studio.
In general, for us to be able to help, you have to post a complete program
that reports a leak. Your previous example was not just heavily abbreviated
and used the wrong class names, it also didn't have any uses of shared_ptr
at all (although it did have a thread_specific_ptr.)
False leak reports are typically caused by static variables whose
destructors haven't yet run when the leak report is generated. Try calling
.reset() on all static shared_ptr variables before exit and see if the leaks
disappear.