trying to work out using shared_ptr with this to pass owning application pointer in to context