# UnsafePtrList

> Initializes and returns an instance of UnsafePtrList.

## Definition

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

## UnsafePtrList(\`0\*\*, int)

Initializes and returns an instance of UnsafePtrList.

```csharp
public UnsafePtrList(T** ptr, int length)
```

### Parameters

**** (\[\<T>\*\*]\(./)): An existing pointer array to set as the internal buffer.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The length.

## UnsafePtrList(int, AllocatorHandle, NativeArrayOptions)

Initializes and returns an instance of UnsafePtrList.

```csharp
public UnsafePtrList(int initialCapacity, AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.UninitializedMemory)
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The initial capacity of the list.**** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator to use.**** (\[NativeArrayOptions]\(/engine/6000.7/script-reference/unity/collections/nativearrayoptions)): Whether newly allocated bytes should be zeroed out.
