## WeakReference< T >::TryGetTarget method


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

```cpp
bool System::WeakReference<T>::TryGetTarget(const SmartPtr<T> &data) const
```


| 参数 | 类型 | 描述 |
| --- | --- | --- |
| data | const SmartPtr\<T\>\& | [Object](../../object/) 被当前的 [WeakReference](../../weakreference/) 对象引用。 |

### ReturnValue

如果操作成功则为 true，否则为 false。

## 另见

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