
30 Apr
2008
30 Apr
'08
5:34 p.m.
Daniel Frey:
The important thing is, that this test showed something else: The current tests without esft_constructor tests don't check who takes ownership of an enable_shared_from_this-derived object in case there are multiple simultaneous owners available.
The attached patch checks that - and AFAICT it would fail with the 1.35.0 esft. (Both reference versions from above do pass).
Should this be added?
We first need to decide which one we want to test for. The new behavior looks slightly better to me; when two shared_ptr instances take ownership of the same object, it's likely that the first one is the "legitimate" owner and the second one uses a null deleter.