Hello,
I ran into some functions like "ToPolarCoordinates" that seem not to manage memory usage properly. Compared to "Norm" :
$HistoryLength = 0;
Do[
ToPolarCoordinates[{x, y, z}];
Print@MemoryInUse[],
3];
Do[
Norm[{x, y, z}];
Print@MemoryInUse[],
3];
Out:
96411880
96432720
96453368
96451496
96451496
96451496
I tried other coordinate transformation functions like "ToSphericalCoordinates" and find the same behavoir. Each call to these functions takes extra memory.
And it only occurs to symbolic evaluations. Numerical evaluation is OK:
$HistoryLength = 0;
Do[
ToPolarCoordinates[{1, 2, 3}];
Print@MemoryInUse[],
3];
Out:
96456792
96456792
96456792
Is there some sort of memory leak bug in this behavoir? Tested on MMA 13.3.1.