mirror of
https://github.com/wolfpld/tracy
synced 2025-05-07 15:33:52 +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
|
||||
ctx.active = active;
|
||||
#endif
|
||||
if( !ctx.active ) return ctx;
|
||||
if( !ctx.active )
|
||||
{
|
||||
tracy::tracy_free( (void*)srcloc );
|
||||
return ctx;
|
||||
}
|
||||
const auto id = tracy::GetProfiler().GetNextZoneId();
|
||||
ctx.id = id;
|
||||
|
||||
@ -2811,7 +2815,11 @@ TRACY_API TracyCZoneCtx ___tracy_emit_zone_begin_alloc_callstack( uint64_t srclo
|
||||
#else
|
||||
ctx.active = active;
|
||||
#endif
|
||||
if( !ctx.active ) return ctx;
|
||||
if( !ctx.active )
|
||||
{
|
||||
tracy::tracy_free( (void*)srcloc );
|
||||
return ctx;
|
||||
}
|
||||
const auto id = tracy::GetProfiler().GetNextZoneId();
|
||||
ctx.id = id;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user