Tagged articles
15 articles
Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Aug 2, 2023 · Fundamentals

Practical Python Garbage Collection and Memory Analysis: 10 Useful Code Examples

This article explains Python's automatic garbage collection mechanisms, including reference counting and cyclic garbage collection, and presents ten practical code snippets demonstrating how to inspect reference counts, list objects, trace memory usage, and employ profiling tools such as tracemalloc, memory_profiler, pympler, and objgraph to detect leaks and optimize memory usage.

code-examplesgarbage-collectionmemory-management
0 likes · 4 min read
Practical Python Garbage Collection and Memory Analysis: 10 Useful Code Examples
21CTO
21CTO
Jul 28, 2023 · Backend Development

How I Built a Toy Java Virtual Machine in Rust – Lessons and Code

After learning Rust, I created a toy Java Virtual Machine called rjvm, open‑sourced on GitHub, detailing its architecture, class file parsing, bytecode execution, value modeling, instruction handling, exception processing, and a simple stop‑the‑world garbage collector, while sharing insights and code snippets.

JVMbytecodegarbage-collection
0 likes · 15 min read
How I Built a Toy Java Virtual Machine in Rust – Lessons and Code
Architecture Digest
Architecture Digest
Jul 26, 2023 · Backend Development

Why ThreadPoolExecutor Threads Are Not Reclaimed Without Calling shutdown in Java

The article explains how a Java ThreadPoolExecutor can retain hundreds of waiting threads when shutdown is omitted, analyzes the GC‑root relationship of running threads, and demonstrates through code and JVisualVM screenshots that invoking shutdown or shutdownNow properly interrupts idle workers, removes them from the pool, and allows both the worker threads and the thread‑pool object to be garbage‑collected.

JavaShutdownThreadPoolExecutor
0 likes · 12 min read
Why ThreadPoolExecutor Threads Are Not Reclaimed Without Calling shutdown in Java
ELab Team
ELab Team
Apr 17, 2022 · Frontend Development

Mastering JavaScript Memory: Types, Garbage Collection, and Leak Prevention

This article explains JavaScript's memory allocation across code, stack, and heap spaces, details how different data types are stored, describes garbage collection mechanisms, and provides practical steps to detect and fix memory leaks, including a React-specific example.

garbage-collectionmemory-leakmemory-management
0 likes · 18 min read
Mastering JavaScript Memory: Types, Garbage Collection, and Leak Prevention
Selected Java Interview Questions
Selected Java Interview Questions
Apr 15, 2022 · Fundamentals

Why Setting Unused Objects to null Can Influence Java Garbage Collection

This article explains the misconception that manually assigning null to unused objects always helps Java garbage collection, demonstrates with concrete JVM examples how stack slots and reachability analysis affect object reclamation, and shows when null‑assignment or slot reuse actually makes a difference.

Javagarbage-collectionmemory-management
0 likes · 10 min read
Why Setting Unused Objects to null Can Influence Java Garbage Collection
Architect's Tech Stack
Architect's Tech Stack
Jun 5, 2021 · Fundamentals

Understanding Java Object Memory Layout and the Size of new Object()

This article explains how Java objects are stored in memory, analyzes the heap layout, object header, instance data, and padding, demonstrates the byte size of a new Object() with and without compressed OOPs, and discusses object access methods and garbage‑collection regions.

Object Sizecompressed-oopsgarbage-collection
0 likes · 12 min read
Understanding Java Object Memory Layout and the Size of new Object()
Programmer DD
Programmer DD
May 11, 2021 · Fundamentals

Mastering Java Constructors and Design Patterns: From Implicit to Singleton

This article provides a comprehensive guide to Java object creation, covering implicit, no‑argument, and argument constructors, initialization blocks, static initialization, default value guarantees, visibility rules, garbage collection, finalizers, and common construction patterns such as singleton, helper, factory, and dependency injection.

ConstructorsInitializationSingleton
0 likes · 17 min read
Mastering Java Constructors and Design Patterns: From Implicit to Singleton
Wukong Talks Architecture
Wukong Talks Architecture
Nov 20, 2020 · Backend Development

Understanding PHP Garbage Collection and Reference Counting

This article explains PHP's garbage collection mechanism, detailing how reference counting works, the role of zval structures, the identification and reclamation process, and provides source code insights to compare PHP's approach with Java's garbage collection.

PHPbackend-developmentgarbage-collection
0 likes · 9 min read
Understanding PHP Garbage Collection and Reference Counting
Programmer DD
Programmer DD
Jun 1, 2020 · Fundamentals

Why Setting Unused Objects to null Matters in Java: A Deep Dive into JVM GC

This article demystifies the common advice of setting unused objects to null in Java by examining JVM garbage collection, runtime stack behavior, and stack slot reuse, demonstrating through code examples how null assignments or variable reuse affect object reclamation.

garbage-collectionmemory-managementnull assignment
0 likes · 9 min read
Why Setting Unused Objects to null Matters in Java: A Deep Dive into JVM GC
Programmer DD
Programmer DD
Dec 2, 2019 · Fundamentals

How to Detect and Fix Java Memory Leaks: Real‑World Examples and Best Practices

This tutorial explains what Java memory leaks are, why they happen despite garbage collection, shows common leak patterns such as static fields, unclosed resources, improper equals/hashCode, inner classes, finalize, constant strings and ThreadLocal, and provides practical detection and prevention techniques.

Profilingbest-practicesgarbage-collection
0 likes · 16 min read
How to Detect and Fix Java Memory Leaks: Real‑World Examples and Best Practices
Java Architect Essentials
Java Architect Essentials
Mar 7, 2018 · Backend Development

Understanding the Young Generation and Survivor Spaces in Java HotSpot JVM Garbage Collection

The article explains why the JVM uses a generational heap, describes the structure and operation of the young generation—including Eden and two Survivor spaces—illustrates object lifecycles, the role of Survivor spaces in preventing fragmentation, and outlines related JVM tuning parameters.

JavaSurvivor SpaceYoung Generation
0 likes · 10 min read
Understanding the Young Generation and Survivor Spaces in Java HotSpot JVM Garbage Collection