paint-brush
Debugging RAM: Detect/Fix Memory Leaks in Managed Languages - Heap Deep Dive, Part 2by@shai.almog
812 reads
812 reads

Debugging RAM: Detect/Fix Memory Leaks in Managed Languages - Heap Deep Dive, Part 2

by Shai Almog10mJanuary 25th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

We shouldn't wait for memory leaks to come up as production issues. We can use some simple strategies to avoid them in the first place: * Create memory leak unit tests - although those are flaky * Run tests within a limited RAM VM * Write APIs that log remaining bound objects when exiting * Write stateless code where possible and familiarize yourself with the exact stateful aspects of your code. Inspect the stateful objects in a debugger to make sure they don't reference global state * Periodically review your apps RAM usage and try to make sense of the objects you see in front of you

People Mentioned

Mention Thumbnail

Companies Mentioned

Mention Thumbnail
Mention Thumbnail

Coin Mentioned

Mention Thumbnail
featured image - Debugging RAM: Detect/Fix Memory Leaks in Managed Languages - Heap Deep Dive, Part 2
Shai Almog HackerNoon profile picture
Shai Almog

Shai Almog

@shai.almog

Author, DevRel, Blogger, Open Source Hacker, Java Rockstar, Conference Speaker, Instructor and Entrepreneur

About @shai.almog
LEARN MORE ABOUT @SHAI.ALMOG'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Shai Almog HackerNoon profile picture
Shai Almog@shai.almog
Author, DevRel, Blogger, Open Source Hacker, Java Rockstar, Conference Speaker, Instructor and Entrepreneur

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite