replace raw pointer with weak_ptr

Authored by cullmann on Aug 29 2018, 9:08 AM.