handle weak references