The shared_ptr must be stored in the sink for the handler to be able to retriev it: