Piotr Caban (@piotr) commented about dlls/msvcrt/concurrency.c:
union allocator_cache_entry *next, *cur; int i;
- if (InterlockedDecrement(&this->refcount)) {
TRACE("skipping dtor: refcount not zero\n");
return;
- }
C++ classes are not working this way - you can't add refcounting. Most probably context cancels all task collections on destroy but it's hard to say without tests.