mirror of
https://github.com/wolfpld/tracy
synced 2025-05-09 16:23:54 +00:00
Free source location, if zone is not active.
This commit is contained in:
parent
0ba95a5b29
commit
129b80ef0f
@ -2775,7 +2775,11 @@ TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_alloc( uint64_t srcloc, int act
|
|||||||
#else
|
#else
|
||||||
ctx.active = active;
|
ctx.active = active;
|
||||||
#endif
|
#endif
|
||||||
if( !ctx.active ) return ctx;
|
if( !ctx.active )
|
||||||
|
{
|
||||||
|
tracy::tracy_free( (void*)srcloc );
|
||||||
|
return ctx;
|
||||||
|
}
|
||||||
const auto id = tracy::GetProfiler().GetNextZoneId();
|
const auto id = tracy::GetProfiler().GetNextZoneId();
|
||||||
ctx.id = id;
|
ctx.id = id;
|
||||||
|
|
||||||
@ -2811,7 +2815,11 @@ TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_alloc_callstack( uint64_t srclo
|
|||||||
#else
|
#else
|
||||||
ctx.active = active;
|
ctx.active = active;
|
||||||
#endif
|
#endif
|
||||||
if( !ctx.active ) return ctx;
|
if( !ctx.active )
|
||||||
|
{
|
||||||
|
tracy::tracy_free( (void*)srcloc );
|
||||||
|
return ctx;
|
||||||
|
}
|
||||||
const auto id = tracy::GetProfiler().GetNextZoneId();
|
const auto id = tracy::GetProfiler().GetNextZoneId();
|
||||||
ctx.id = id;
|
ctx.id = id;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user