Problem with deleting tasks using vTaskDelete();

So, how Can I check errors in the task creation? And how it is possible to exhaust resources if after execute task resources should be released. This code turn on LED diod ws2812b. Turn on all diods takes one second. Even I run 2 tasks at the same moments resources should be
enough. In my opinion only explanation is that unnecessary resurces of old tasks are stored.

Guys, thanks for help, actually I can’t add new comment cause I’m new user.

Instead of struggling with dynamic task creation/deletion you should think about a (minor) redesign of your turnOn_task and the control of it.
Start the task just once, enter a while(1) loop where you wait for a request to turn on LEDs, do it and loop back to wait for the next request. Simple, good and kind of standard way of implementing a functionality running as task.
If the turnOn_task just needs to be re-triggered to turn on LEDs (again), a simple task notification or semaphore is sufficient.

If you read the documentation for the function, it returns a value indicating if it succeeded or not.

You could be running out of memory if other tasks (or that task) are allocating other blocks of dynamic memory.