Boost logo

Boost Users :

Subject: Re: [Boost-users] [serialization] Memory leaks even with shared_ptrs
From: Maxime van Noppen (maxime_at_[hidden])
Date: 2011-07-21 10:15:59

On 07/21/2011 04:02 PM, cc caprani wrote:
> int main()
> {
> std::cin.get(); // hold console window open
> _CrtDumpMemoryLeaks(); // report memory leaks
> }


I don't know how _CrtDumpMemoryLeaks() works, but at the call point
nothing has been deleted yet as nothing went out of scope.

Try putting what is in your main() currently into another scope, for

int main()
     // ... all your code ...

   // Now that we exited the previous scope, everything should've
   // been deleted...



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at