# Pop

> Removes and returns the last element of this append buffer.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Collections.LowLevel.Unsafe](/engine/6000.7/script-reference/unity/collections/lowlevel/unsafe.md)
* **Assembly:** UnityEngine.ManagedKernelModule

## Pop\<T>()

Removes and returns the last element of this append buffer.

```csharp
public T Pop<T>() where T : unmanaged
```

### Returns

| Type | Description                                             |
| ---- | ------------------------------------------------------- |
| T    | The element removed from the end of this append buffer. |

### Remarks

It is your responsibility to specify the correct type. Do not pop when the append buffer is empty.

## Pop(void\*, int)

Removes and copies the last element of this append buffer.

```csharp
public void Pop(void* ptr, int structSize)
```

### Parameters

**** (\[void\*]\(https\://learn.microsoft.com/dotnet/api/system.void)): The location to which the removed element will be copied.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The size of the element to remove and copy.

### Remarks

It is your responsibility to specify the correct `structSize`. Do not pop when the append buffer is empty.
