> + EnterCriticalSection(&This->lock); > + This->colors = colors; > + This->count = count; > + This->type = type; > + LeaveCriticalSection(&This->lock); You're leaking the previous value of This->colors.