Managing proxies from C++

Hello dear Paraview developers!

Could you please explain me, why such a snippet does not work?

vtkSMSession* session = vtkSMSession::New();

vtkSMSessionProxyManager* pxm = session->GetSessionProxyManager();
vtkSmartPointer<vtkSMProxy> proxy;
proxy.TakeReference(pxm->NewProxy("sources", "SphereSource"));

vtkSMPropertyHelper(proxy, "Radius").Set(2);
proxy->UpdateVTKObjects();

Thank you!