Boost logo

Boost Users :

From: Matthias Troyer (troyer_at_[hidden])
Date: 2008-07-25 19:28:44


On 25 Jul 2008, at 13:53, Brad Anderson wrote:

> I'm getting memory leaks when deserializing objects and I can't
> figure out what I'm doing wrong. I'm using VC++ 2005. I've boiled
> it down to the following code:

Just a quick guess:

> //virtual ~Base() { } // uncommmenting this causes leaks to
> disappear

The base class needs a virtual destructor, thus uncommenting this is
needed.

Matthias


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