How to dispose a Native List ?? [A Native Collection has not been disposed]

Hello guys,
For the past week I have been working with DOTS. Its amazing I recommend it.
My problem is that I create a new native list at OnEnable inside a blob wrapper. And I need to be persistent through out the game.

    private void OnEnable()
    {
        localLstAttractor = new List<Transform>();
        totalSpawnedBoids = 0;
        entitymanager = World.DefaultGameObjectInjectionWorld.EntityManager;
        currentPosition = this.transform.position;
        ea = entitymanager.CreateArchetype(
            typeof(Translation),
            typeof(Rotation),
            typeof(LocalToWorld),
            typeof(RenderMesh),
            typeof(RenderBounds),
            typeof(Boid_ComponentData)
            );
        debugEntities = new List<Entity>();

        BlobBuilder bb = new BlobBuilder(Unity.Collections.Allocator.Temp);
        boidManagerReference = new BlobAssetReference<BoidManagerBLOB>();
        ref BoidManagerBLOB bmb = ref bb.ConstructRoot<BoidManagerBLOB>();
        BlobBuilderArray<Boid_Manager> blobManagerArray = bb.Allocate(ref bmb.blobManagerArray, 9);
        blobManagerArray[0] = new Boid_Manager
        {
            cohesionBias = cohesionBias,
            separationBias = separationBias,
            alignmentBias = alignmentBias,
            targetBias = targetBias,
            perceptionRadius = perceptionRadius,
            step = step,
            cellSize = cellSize,
            fieldOfView = fieldOfView,
            maxPercived = maxPercived,
            maxObstacleDistance = maxObstacleDistace,
            maxDistanceAttractor = maxDistanceFromAttractor,
            maxDistanceGate = maxDistanceFromGate,
            GatePos = new NativeList<float3>(Allocator.Persistent)
    };
        boidManagerReference = bb.CreateBlobAssetReference<BoidManagerBLOB>(Allocator.Persistent);
        bb.Dispose();
        if (colliderMesh != null)
        {
            col = CreateSphereCollider(colliderMesh);
        }

    }

And in OnDestroy I am disposing the native list and the boidManagerReference

    private void OnDestroy()
    {
        col.Dispose();
        boidManagerReference.Value.blobManagerArray[0].GatePos.Clear();
        boidManagerReference.Value.blobManagerArray[0].GatePos.Dispose();
        boidManagerReference.Dispose();
    }

Even with this things I still get an error from unity saying
A Native Collection has not been disposed, resulting in a memory leak. Allocated from:
Boid_Spawner:OnEnable() (at Assets/Collider Cast/Scripts/Boid_Spawner.cs:82)

And I looked over the activity monitor and I can see that the memory its increasing at each PLAY

Could Anyone explain me a bit what’s happening here ??
As well after I tried it on a different computer. Realised that the fps drops by half if I play multiple times

PS: some parts of the code are from a tutorial on boids and ecs

The exact opposite of OnEnable() is technically OnDisable(), not OnDestroy().

Have you tried putting it there instead?

There is no guarantee that OnEnable() and OnDestroy() are called alternatingly.

I just tried that and it still give me the same error.

(Just added this to the main post) As well after I tried it on a different computer. Realised that the fps drops by half if I play multiple times

    private void OnDisable()
    {
        col.Dispose();
        boidManagerReference.Value.blobManagerArray[0].GatePos.Clear();
        boidManagerReference.Value.blobManagerArray[0].GatePos.Dispose();
        boidManagerReference.Dispose();
    }

First thing to isolate would be your call sequence from the lifecycle of stuff:

Make a tiny script with Start as a coroutine (declare it as such), yield for a second, make the array, yield another second, dispose of it, wait a second and exit.

If that gives an error then either we are misunderstanding how you’re supposed to dispose on these things, or perhaps Unity has a bug. In the latter case you have repro code ready then!