Add support for zeroing weak references