Use weak reference for delegate

Using weak reference for delegate.