# GetPooled(Rect, Rect)

> Gets an event from the event pool, and initializes it with the specified values. Use this method instead of instancing new events. Use Dispose() to release events back to the event pool.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.UIElements](/engine/6000.5/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public static GeometryChangedEvent GetPooled(Rect oldRect, Rect newRect)
```

### Parameters

**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The old dimensions of the element.**** (\[Rect]\(/engine/6000.5/script-reference/unityengine/rect)): The new dimensions of the element.

### Returns

| Type                                                                                                   | Description           |
| ------------------------------------------------------------------------------------------------------ | --------------------- |
| [GeometryChangedEvent](/engine/6000.5/script-reference/unityengine/uielements/geometrychangedevent.md) | An initialized event. |
