note that size() can give larger than actual. Skip dead entries in lock_*() instead of throwing.
Containers for weak_ptr which automatically remove dead references.