Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost::Serialization and MFC Doc/View architecture
From: Robert Ramey (ramey_at_[hidden])
Date: 2011-07-04 11:55:22


Colin Caprani wrote:
> On Sun, Jul 3, 2011 at 7:19 PM, Robert Ramey <ramey_at_[hidden]> wrote:

> I now have one small(ish) problem: I get a memory exception when I
> try to delete a pointer to an object created from a load operation in
> the clear() function. It fails at: _ASSERTE(pHead->nBlockUse ==
> nBlockUse); I think it's because the serialization library allocates
> on a different heap to the local one. This this sound right? I know
> it's not great practice but I can probably live with this leak until
> I implement shared_ptr which should eliminate it - am I right about
> that?!

My personal experience is that ignoring this will lead to grief down
the road. I don't know what your load function does so I can't
comment in particular case.

Robert Ramey


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