Memory question regarding function inside timer call

I wonder if it is okay to use a LOT of calls like this memory wise:

hpcounttimer=performWithDelay(1000,function() fc.countup\_hp(value) end,1)

I wonder because there always is a function created inside the timer to get the (value) to the called function fc.countup_hp

Is this used memory for the function inside the timer getting freed when the timer hpcounttimer is canceled and set to nil?

Is it better to use this when the local function is always created when the timer is used, meaning whenever I click a button the function doitnow is created locally:

local doitnow=function()        fc.countup\_hp(value) end hpcounttimer=performWithDelay(1000,fc.countup\_hp,1)

I haven’t noticed memory leaks using either of these approaches.  The biggest problem I have with a ton of timers is making sure they all get cancelled after completion.  I track all the timers and cancel them individually if they expire.

i put my timers in a table. so it’s pretty easy to cancel them all…just for loop the table…

same for the transitions.