M
Matthias Kaeppler
Hi,
I thought it'd be a better idea to start a new thread dealing directly
with my problem. Okay, here's again what's happening:
I'm storing boost::shared_ptrS in an std::set. I supposed that on
program exit, when the set's dtor is called, the shared_ptrS would clean
up after themselves appropriately. What actually happens though is that
the program segfaults when the set is destructed.
I noticed that erasing the smart pointers from the std::set does not
work as expected. IIRC, std::set finds its elements by checking for
/equivalance/, right? That means, it would check for !less && !greater
right?
So, does that work with boost::shared_ptr at all? I know it features an
operator==, but that would only work if the container would check for
equality, which is not the case.
But then, even if my observation would be correct, I can't explain why
destroying the set would cause the program to segfault.
Any ideas?
Thanks,
Matthias
I thought it'd be a better idea to start a new thread dealing directly
with my problem. Okay, here's again what's happening:
I'm storing boost::shared_ptrS in an std::set. I supposed that on
program exit, when the set's dtor is called, the shared_ptrS would clean
up after themselves appropriately. What actually happens though is that
the program segfaults when the set is destructed.
I noticed that erasing the smart pointers from the std::set does not
work as expected. IIRC, std::set finds its elements by checking for
/equivalance/, right? That means, it would check for !less && !greater
right?
So, does that work with boost::shared_ptr at all? I know it features an
operator==, but that would only work if the container would check for
equality, which is not the case.
But then, even if my observation would be correct, I can't explain why
destroying the set would cause the program to segfault.
Any ideas?
Thanks,
Matthias