If an ECMAScript implementation does not include the ECMA-402 API the following specification of the toLocaleString method is used.
[...]
This function is implementation-defined, and it is permissible, but not encouraged, for it to return the same thing astoString
.
> Возможно дело в том что я вызов функции делаю через рекурсию?
Какая маленькая несущественная деталь…
Если у вас утечки памяти, то и задавайте соответствующий вопрос с примером релевантного кода.