I'm encountering an issue while using the TreeDistance() function to process large datasets. After the computations are completed, the process appears to freeze without returning any output. Concurrently, I observe that the memory usage continues to increase indefinitely. This behavior suggests a possible memory leak within the function when dealing with substantial amounts of data.