Hello.
I think better place asThreadCleanup in asSetGlobalMemoryFunctions, because now we can allocate thread memory with one allocator, but deallocate with other.
For now asThreadCleanup placed only in asResetGlobalMemoryFunctions.
I encounter this error and take some hours to find what happening, better to avoid this situations for others.
Or at least need place notice in function description about this behaviour.