## WeakReference< T >::SetTarget method


Sets the object (the target) referenced by the current [WeakReference](../../weakreference/) object.

```cpp
void System::WeakReference<T>::SetTarget(const SmartPtr<T> &data)
```


| Parameter | Type | Description |
| --- | --- | --- |
| data | const SmartPtr\<T\>\& | [Object](../../object/) to set. |

## See Also

* Class [SmartPtr](../../smartptr/)
* Class [WeakReference< T >](../)
* Namespace [System](../../)
* Library [Aspose.TeX for C++](../../../)
