Boost logo

Boost Users :

Subject: Re: [Boost-users] Question on intrusive hooks
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-10-15 12:26:55


bsing escribió:
> I'm trying to come to grips with using the boost intrusive containers,
> but I don't think I understand how the lifetime of hooks need to be
> managed.

The node is being destroyed (note vec is destroyed before tree) while
inserted in "tree". That's a lifetime error, you are end up storing
garbage in the tree after vec is destroyed. Just change the order of the
first lines.

Best,

Ion


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