MCPcopy Create free account
hub / github.com/Tencent/TscanCode / checkForUnsafeArgAlloc

Method checkForUnsafeArgAlloc

trunk/lib/checkmemoryleak.cpp:2831–2864  ·  view source on GitHub ↗

--------------------------------------------------------------------------- Check if an exception could cause a leak in an argument constructed with shared_ptr/unique_ptr. For example, in the following code, it is possible that if g() throws an exception, the memory allocated by "new int(42)" could be leaked. See stackoverflow.com/questions/19034538/ why-is-there-memory-leak-while-using-shared-ptr

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 6

isEnabledMethod · 0.80
tokAtMethod · 0.80
nextArgumentMethod · 0.80
emptyMethod · 0.80
isCPPMethod · 0.45
strMethod · 0.45

Tested by

no test coverage detected