This game has very serious memory leak. I have figured out a way to 100% reproduce this issue.
I have a ice farm design. The world download link is over here.
https://drive.google.com/file/d/1ioBqOfgjs2pOHwt5brA7-xHrQcxUZgrr/view?usp=sharing
Just enter the world and flip the lever. And then you will see momery leak in a incredible fast speed(5.5GB/h). Turn on the command block to clear the ices if you are testing longer. This will 100% reproduce the memory leak process.
Linked issues
relates to
Attachments
Comments
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki

Affects 1.18.10.
Steps to reproduce:
1. Create a setup that moves a large amount of blocks (e.g. the attached world downloads).
2. Open a hardware monitoring software (Windows Task Manager will work) and write down the memory usage.
3. Launch your contraption.
Observed results:
After some amount of time (usually 1 hour or less will suffice), the memory usage will have increased. The severity of the memory leak will depend on the amount of blocks moved.
Expected results:
The memory usage does not keep increasing constantly.
The memory leak issue will be less relevant for casual gameplay, whereas anything that moves blocks consistently will accumulate memory usage rather quickly (e.g. a medium sized stone farm).
A basalt farm I have built will accumulate over 2.5GB/h in memory leakage, which eventually results in a crash. In my case, the game crashed after around 45min of usage. This issue greatly inhibits the already inferior capabilities of pistons on Bedrock Edition.Â
My system configuration is as following:
Windows 11 Pro
Ryzen 5 5600X
16GB DDR4 3600mhz
GTX 1070
My test setup can be found here:
[media]To start the farm, simply find the lever with the redstone lamp in front of the farm that has a sign stating "Farm Toggle".
Â

Seems likely that the underlying mechanic would also affect moss farms since they constantly generate and move blocks

After running each farm for 15 minutes or so on my i5-8500 PC with integrated graphics with Task Manager open, I observed increasing memory usage by Minecraft with the original ice farm, but not with the basalt farm. [EDIT: apparently I messed up the basalt farm somehow and was not really seeing it run.)
The ice farm also exhibited significant lag. I was able to move around normally but block placing and breaking response and animations were delayed. The memory usage by Minecraft continued to increase after I shut the farm off. So, to check whether something else might be going on, I turned on command block output and command feedback and found that a gametime query was running every 10 ticks. I also found that that a ticking area was set up around the ice farm. I'm not sure to make of this--if the memory leak is a result of overloading the device running the game by maxing out simulation distance and using a huge ticking area and command blocks around a massive amount of moving blocks, I'm not sure that is really a bug, so I will leave it to others to judge.

I attached a before and after comparison for my basalt farm example.
After only 15 minutes, the memory usage increases from 419,6MB to 1291,1MB.Â
Should the rate of accumulation be constant, my setup would accumulate over 3GB worth of memory leaks per hour.

I'm not sure if this relates to this, but I have a world where I am trying to animate a moving meteor.Â
I used the /clone command to move itself down y-1, and I put the command block on repeat. It moves a few times, but then stops (Expected result - Object should keep moving until it has reached world limits).
After a few minutes, breaking blocks have no animation, and you can't interact with any other blocks. I noticed at this point that my memory usage had hit 100% (32GB), taken up by Minecraft. Shortly after this, my disk usage peaked and my game crashed.
[media]Â

I cannot reproduce this in 1.20.31. The Xploit basalt farm breaks shortly after I turn it on (water spills out of the bottom and I can see broken redstone dust items laying around the bottom). I ran the ice farm provided by the reporter for over an hour and memory usage by Minecraft actually went down from about 1050 MB to 980 MB.
Can anyone else reproduce this?

This issue has not yet been fixed as of 1.19.2. I have a huge mob farm with a lot of moving platforms and in about 1h from activation my allocated 8 GB of RAM fill and the game crashes.
Thank you for your report!
However, this issue has been temporarily resolved as Awaiting Response
Is this still an issue in the latest version?
If it is, please be sure to include steps to reproduce the problem:
If your ticket does not look like the example given here, then it's likely to be closed as incomplete.
This ticket will automatically reopen when you reply.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki