fix profiler memory leak

This commit is contained in:
gmega 2023-11-16 12:34:12 -03:00
parent a3ae613fff
commit bb00e3958b
No known key found for this signature in database
GPG Key ID: FFD8DAF00660270F

View File

@ -124,6 +124,8 @@ proc handleFutureComplete*[TFutureBase](self: var AsyncProfiler[TFutureBase],
self.futureSummaryMetrics.withValue(loc, metric):
metric[].addRun(runMetrics)
self.perFutureMetrics.del(fut.id)
if not isNil(self.onChange):
self.onChange()