Allocate only once: if (mThreadParams.dataCollector == NULL)