Created wrapper for weak_ptr and added invalidate_all_pts() method