4 ms·
I swear, it's fucking garbage collection. I had to something fairly non-trivial in Java once for a phone app in 2011 (it was a simple OCR algorithm that could
by snickerbockers 1y ago
I swear, it's fucking garbage collection. I had to something fairly non-trivial in Java once for a phone app in 2011 (it was a simple OCR algorithm that could read text from low-res images as long as said text was printed by a machine with a clean seriff-like font and only contained numeric digits laid out in a grid) and I remember the biggest problem was that it kept running out of memory and the only solution was to go through the program and manually null every reference the moment it was no longer needed because the GC on android back then apparently was not very good at figuring these things out itself. Which is actually a lot more complicated than deleting pointers in C++ is because there are no destructors in java.
It made a huge difference in terms of execution speed too, IDK if phones with solid-state storage use swap partitions like PCs do but that little phone was definitely struggling with something that went away when I did the one thing the garbage collector is supposed to save me from doing.