1) Especially with the annoying new wxCriticalSectionLocker removal you seem to have thrown in; what's the point of wxCriticalSectionLocker if you're going to dynamically allocate it? :shock:
[...]
My point with an automatic critical section locker inside a curly brace block is that it is about 200 times faster than dynamically allocating and manually freeing it, and it is exception-safe too, which is the main reason why you use a locker object in the first place.
You realize that was a rhetorical question, right?
EDIT: Oh, and in addition to the reasons you gave, you can always call
wxCriticalSection::Enter() and
wxCriticalSection::Leave() instead of dynamically creating and destroying a locker, for the exact same effect but without the dynamic allocation overhead. (So still not exception-safe, but at least as fast as a non-dynamically allocated locker)
(Therefore there is absolutely no reason to
ever use
new wxCriticalSectionLocker. There is always a better way)