# NativeReference

> Initializes and returns an instance of NativeReference.

## Definition

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

## NativeReference(AllocatorHandle, NativeArrayOptions)

Initializes and returns an instance of NativeReference.

```csharp
public NativeReference(AllocatorManager.AllocatorHandle allocator, NativeArrayOptions options = NativeArrayOptions.ClearMemory)
```

### Parameters

**** (\[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.

## NativeReference(T, AllocatorHandle)

Initializes and returns an instance of NativeReference.

```csharp
public NativeReference(T value, AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (T): **** (\[AllocatorHandle]\(/engine/6000.7/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator to use.
