Boost logo

Boost Users :

Subject: Re: [Boost-users] Are memory leaks reported by Boost.Test Microsoft Memory Leak Detection Enabling spurious or real?
From: Jonathan Oulds (jonathan_at_[hidden])
Date: 2010-10-28 08:43:00


This looks like the type of memory leak that occurs after a call to:

typeid(MyType).name();

see this article for a full explanation:

http://support.microsoft.com/kb/140670/en-gb

Personally speaking I find these leaks obscure real leaks in my code.
You can solve this by disabling heap checking, then allocating
typeid(MyType).name() then re-enabling heap checking.

Jonathan.

On 28/10/2010 13:06, Paul A. Bristow wrote:
> I've just added some code (ready for Inverse Gaussian distribution in
> preparation for Boost.Math).
>
> When I added one new section of kosher-looking C++ code, I started to see
> memory leaks reported:
>
> For example:
>
> *** No errors detected
> Detected memory leaks!
> Dumping objects ->
> {3485} normal block at 0x003611B0, 42 bytes long.
> Data:<class boost::mat> 63 6C 61 73 73 20 62 6F 6F 73 74 3A 3A 6D 61 74
> {3484} normal block at 0x003635A0, 8 bytes long.
> Data:< 6 46> B0 11 36 00 F8 34 36 00
> ...
>
> But no filename is given as promised by
> http://msdn.microsoft.com/en-us/library/e5ewb1h3%28v=VS.80%29.aspx
>
> So I'm puzzled if/where I should look for a problem.
>
> (occurs for both debug and release)
>
> Or is this spurious? Should I just suppress the warnings?
>
> Paul
>
>
> ---
> Paul A. Bristow,
> Prizet Farmhouse, Kendal LA8 8AB UK
> +44 1539 561830 07714330204
> pbristow_at_[hidden]
>
>
>
>
> _______________________________________________
> 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