Homec4science

Fix internal memory leak in Windows _Crt report.

Authored by xyb <xyb@xyb.name> on Nov 16 2019, 18:13.

Description

Fix internal memory leak in Windows _Crt report.

We use "MemoryIsNotDeallocated" to aovid internal expected leak reported
in Windows _Crt report, like:

{
#ifdef _MSC_VER
	MemoryIsNotDeallocated memory_is_not_deeallocated;
#endif

	static ThreadIdToThreadLocals* map = new

ThreadIdToThreadLocals();
return map;

}

But int the above code, only "new ThreadIdToThreadLocals()" is
protected, if we invoke "insert()" function of the return value,
the memory allocated in "insert()" will be reported to _Crt report
also. This change try to fix this issue.

Details

Committed
xyb <xyb@xyb.name>Nov 16 2019, 18:13
Pushed
trottetDec 4 2019, 13:52
Parents
R9484:703bd9caab50: Googletest export
Branches
Unknown
Tags
Unknown

Event Timeline

xyb <xyb@xyb.name> committed R9484:dcdb65065f41: Fix internal memory leak in Windows _Crt report. (authored by xyb <xyb@xyb.name>).Nov 16 2019, 18:13