Tracker is a stack object, its constructor/destructor locks/unlocks ThreadCritical, which is heavyweight lock.
With above API, Tracker is constructed twice, which means performing one more unnecessary lock/unlock.
Tracker should be constructed in place to avoid unnecessary lock/unlock.
With above API, Tracker is constructed twice, which means performing one more unnecessary lock/unlock.
Tracker should be constructed in place to avoid unnecessary lock/unlock.