## WeakReference< T >::SetTarget method


设置当前 [WeakReference](../../weakreference/) 对象引用的对象（目标）。

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


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| data | const SmartPtr\<T\>\& | [Object](../../object/) 要设置的对象。 |

## 另见

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