这是Microsoft实现std::thread的一个大错误吗?

Is this a BIG bug of Microsoft's implementation of std::thread?

本文关键字:一个 大错误 实现 Microsoft std thread 这是      更新时间:2023-10-16
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>
#include <thread>
using namespace std;
void Hello()
{}
int main()
{
    {
        std::thread(Hello).join();
    }    
    _CrtDumpMemoryLeaks();
}

输出窗口显示:(vc++编译版本:Nov 2012 CTP)

The thread 0x5ab8 has exited with code 0 (0x0).
Detected memory leaks!
Dumping objects ->
{261} normal block at 0x002A2E00, 44 bytes long.
 Data: <                > 01 00 00 00 00 00 00 00 00 00 00 00 0A 00 00 00 
Object dump complete.
The thread 0x5abc has exited with code 0 (0x0).
The thread 0x5ab4 has exited with code 0 (0x0).
The program '[0x5A94] C++11.exe' has exited with code 0 (0x0).

看看下面的MS Connect条目:

http://connect.microsoft.com/visualstudio/feedback/details/757212/vs - 2012 rc - std -线-报告内存泄漏-甚至在堆栈