bug fix: double free task's stack memory
And 'typedef struct' style change