FreeRTOS 8.2.1 PIC32MX port + heap_4.c
Got some troubles when delete and recreate task. Here is test code:
static void empty_thread(void *param)
{
for(;;)
{
vTaskDelay(10);
}
}
static void ApplicationTaskThread(void *params)
{
for(;;)
{
uint32_t priority = uxTaskPriorityGet(NULL) + 1;
TaskHandle_t task = NULL;
xTaskCreate(empty_thread, “empty”, 128, NULL, priority, &task);
ASSERT_NE(task, NULL);
vTaskDelay(0);
vTaskDelete(task);
vTaskDelay(1);
}
}
void vApplicationIdleHook( void )
{
for(;;)
{
taskYIELD();
}
}
I can create breakpoint and see that idle hook get processor time. Still task resources are never freed. I am using MPLAB X RTOSviewer plugin for debuging.

Screenshot in attachment.
What am i doing wrong? Thanks in advance.
Update. Cant fomat code somehow readable. Is there any special tag?