The force will be removed and not leak.
The handle ID used by the force however might persist and leak unless you eithor eventually reuse the variable with another force or set it to null.
This is because it only recycles handle indexes once all references to it are nulled, and that includes global and local variables.
As long as the variable is reused it will not leak, the handleID leak is only a problem for once off coding.
function GetForceOfPlayer takes player whichPlayer returns force
local force f = CreateForce()
call ForceAddPlayer(f, whichPlayer)
return f
endfunction