From: "David Abrahams" <[EMAIL PROTECTED]>

> I could use something like a std::map< weak_ptr<>, PyObject* >, ...

Yes, that's the "canonical" solution if you need to associate arbitrary data
with objects managed by shared_ptrs.

> ... but that would be truly awful:
>
> 1. I would need to sweep the map of dead entries periodically
> 2. It would incur a great deal of overhead
> 3. It would be very complicated.

I agree with (1), but (2) & (3) don't look obvious to me.

Please think about this solution for a while to see whether it stays "truly
awful". :-)

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to