Allocation and Freeing of the Secure Context of a task

Currently, if some task has allocated a secure context to invoke NSC API call, and the job of the task is completed. Who should release that secure context allocated?
Is it the responsibility of the task or the kernel?
Don’t we think that the secure context free should be done in the task explicitly?
Or it it need to be done in vTaskDelete() when one is terminating a task?

Both the non secure and the secure context of a task will remain until the task is deleted.

shouldn’t the secure context pf the task be freed when the task thinks its appropriate to do so? since the allocation of secure context is not during task creation, why the release should be dependent on task deletion?

Our anticipation is/was that only a few tasks would require a secure context, and that the secure context would then be required for the lifetime of the task. If you feedback is that that is not the case then we can add a method to delete the secure context again.

Sorry for delayed response.
I think your assumption is/was fair.
Mostly the task which needs secure context should be needing this throughout.

With respect to design part, I would still think we should allow a task to free its secure context. Since a task has to allocate secure context, it should be task’s responsibility to release this.