Opened 8 years ago

Closed 8 years ago

#9949 closed Feature Requests (fixed)

clear header node hooks upon intrusive container destruction

Reported by: Matei David <matei@…> Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: intrusive
Version: Boost 1.55.0 Severity: Problem
Keywords: intrusive header hooks Cc:

Description

In intrusive containers, the safe_link and auto_unlink hook types cause boost to reset the hooks to their default constructed state (usually NULL) upon removing an element from a container. That suggests a user could double check that nodes are indeed removed from all containers upon destruction, by checking that the hooks are set to NULL. Unfortunately, the check fails because, unlike all other regular nodes, the hooks of the container header nodes are not reset upon destruction of the container.

I will create a pull request which rectifies this in list, slist, and bstree. I will drop it on top of the develop branch, which has the recent fix to bug #9940.

I believe the change should have no negative impact.

Attachments (1)

unlink-header.cpp (1.7 KB ) - added by Matei David <matei@…> 8 years ago.
demonstrates the issue

Download all attachments as: .zip

Change History (3)

by Matei David <matei@…>, 8 years ago

Attachment: unlink-header.cpp added

demonstrates the issue

comment:1 by Matei David <matei@…>, 8 years ago

Pull request here.

comment:2 by Ion Gaztañaga, 8 years ago

Resolution: fixed
Status: newclosed

Fixed in commit SHA-1: fc6d3cca5fd7e122c4b608df3e659c1120552975

  • Reverted wrong commit SHA-1: 62367b52e197b1dbca5ec8ba423a2ce3bfc89790 and removed include to recently deleted "detail/clear_on_destructor_base.hpp" file.
Note: See TracTickets for help on using tickets.