Tag

Memory Leak

0 views collected around this technical thread.

Lobster Programming
Lobster Programming
Jun 3, 2025 · Backend Development

How ThreadLocal Can Cause Memory Leaks in Java Multithreading

This article explains how ThreadLocal creates per‑thread variable copies, demonstrates its usage with sample Java code, illustrates the internal storage structure, and reveals why improper handling can lead to memory leaks when thread‑local values persist in thread pools.

JavaMemory Leakconcurrency
0 likes · 3 min read
How ThreadLocal Can Cause Memory Leaks in Java Multithreading
Selected Java Interview Questions
Selected Java Interview Questions
May 22, 2025 · Backend Development

Root Cause Analysis of Excessive Native Memory Usage in a Spring Boot Application after Migrating to MDP Framework

After migrating a project to the MDP framework based on Spring Boot, the system repeatedly reported high swap usage; the author investigated JVM settings, used tools like jcmd, pmap, gperftools, strace, and GDB, identified native memory leaks caused by Spring Boot’s Reflections scanning and Inflater usage, and resolved the issue by configuring scan paths and fixing Inflater handling.

JavaMemory LeakNative Memory
0 likes · 13 min read
Root Cause Analysis of Excessive Native Memory Usage in a Spring Boot Application after Migrating to MDP Framework
Cognitive Technology Team
Cognitive Technology Team
May 4, 2025 · Backend Development

Understanding Java ThreadLocal Memory Leaks: Mechanisms, Risks, Diagnosis, and Defensive Practices

This article explains the inner workings of Java's ThreadLocal, analyzes how weak and strong references can cause memory leaks in thread pools, demonstrates typical leak scenarios with code examples, and provides diagnostic tools and defensive coding practices to prevent such leaks.

Garbage CollectionJavaMemory Leak
0 likes · 9 min read
Understanding Java ThreadLocal Memory Leaks: Mechanisms, Risks, Diagnosis, and Defensive Practices
Cognitive Technology Team
Cognitive Technology Team
May 3, 2025 · Backend Development

Understanding ThreadLocal: Core Principles, Use Cases, Pitfalls, and Best Practices

ThreadLocal provides per‑thread variable storage to achieve thread isolation, improving concurrency performance, and is essential for safe data handling in Java, but improper use can cause memory leaks, data contamination, and other issues; this article explains its internal mechanism, common scenarios, pitfalls, and best‑practice guidelines with code examples.

JavaMemory Leakbest practices
0 likes · 19 min read
Understanding ThreadLocal: Core Principles, Use Cases, Pitfalls, and Best Practices
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Feb 19, 2025 · Frontend Development

Debugging and Fixing Memory Leaks in Vue2 Applications

This article walks through reproducing a memory‑leak scenario in a Vue2‑based terminal application, analyzes common leak causes, demonstrates how adding dynamic keys and patching Vue's sameVnode function resolves the issue, and shows how to ship the fix with patch‑package for production deployments.

Memory LeakPatchPatch-package
0 likes · 9 min read
Debugging and Fixing Memory Leaks in Vue2 Applications
IT Services Circle
IT Services Circle
Jan 29, 2025 · Backend Development

How to Handle Frequent Full GC and High CPU Usage in Java Backend Development

This article explains common interview questions on frequent Full GC and high CPU usage in Java backend development, detailing root causes, JVM parameter adjustments, memory leak prevention, and code optimization techniques, along with practical code examples and tool recommendations for effective performance tuning.

CPU optimizationFull GCJVM
0 likes · 8 min read
How to Handle Frequent Full GC and High CPU Usage in Java Backend Development
Selected Java Interview Questions
Selected Java Interview Questions
Aug 31, 2024 · Backend Development

Root Cause Analysis of Excessive Swap Usage in a Spring Boot Project: Native Memory Leak Triggered by MCC Package Scanning

This article details a step‑by‑step investigation of a Spring Boot application that consumed far more physical memory than its 4 GB heap limit, revealing a native‑memory leak caused by MCC's package‑scanning using Reflections and the Spring Boot ZipInflaterInputStream, and explains how configuration changes and newer Spring Boot versions resolve the issue.

JVMJavaMCC
0 likes · 13 min read
Root Cause Analysis of Excessive Swap Usage in a Spring Boot Project: Native Memory Leak Triggered by MCC Package Scanning
Deepin Linux
Deepin Linux
Aug 26, 2024 · Fundamentals

Understanding and Preventing Memory Leaks in C++ Applications

The article explains what memory leaks are, common causes, and presents practical techniques such as avoiding heap allocations, using smart pointers, employing arena allocators, leveraging coroutines, applying RAII, and debugging with tools like gperftools to detect and resolve leaks in C++ programs.

C++CoroutineMemory Leak
0 likes · 12 min read
Understanding and Preventing Memory Leaks in C++ Applications
Mike Chen's Internet Architecture
Mike Chen's Internet Architecture
Aug 4, 2024 · Backend Development

Understanding Java Memory Leaks and How to Prevent Them

This article explains what memory leaks are in Java, outlines common causes such as unreleased resources, static collections, misuse of ThreadLocal, improper variable scope, inner‑class references and off‑heap memory, and provides practical solutions and best‑practice recommendations to avoid them.

JVMJavaMemory Leak
0 likes · 9 min read
Understanding Java Memory Leaks and How to Prevent Them
Code Mala Tang
Code Mala Tang
Aug 2, 2024 · Frontend Development

Why Your setTimeout Can Leak Gigabytes: JavaScript GC Explained

This article examines how JavaScript's garbage collection works, why large objects allocated in setTimeout callbacks can cause memory leaks, and provides practical code examples and strategies to prevent such leaks in V8-powered environments.

Garbage CollectionJavaScriptMemory Leak
0 likes · 10 min read
Why Your setTimeout Can Leak Gigabytes: JavaScript GC Explained
Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Jul 21, 2024 · Backend Development

Understanding Java OutOfMemoryError: Causes, Types, and Fixes

This article explains the various forms of Java OutOfMemoryError, their underlying causes such as heap exhaustion, GC overhead, metaspace limits, and native allocation failures, and provides practical solutions and code snippets to diagnose and resolve each scenario.

Garbage CollectionHeap DumpJVM
0 likes · 9 min read
Understanding Java OutOfMemoryError: Causes, Types, and Fixes
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 25, 2024 · Mobile Development

Optimizing Image Size Retrieval and Memory Management in Flutter

This article examines a Flutter technique for obtaining image dimensions, identifies missing listener removal that can cause memory leaks, and presents an enhanced extension using ImageProvider and ImageDescriptor to safely retrieve size information with optional decode avoidance.

DartFlutterImage
0 likes · 16 min read
Optimizing Image Size Retrieval and Memory Management in Flutter
JD Tech
JD Tech
Jun 13, 2024 · Backend Development

Investigation of Log4j2 Asynchronous Logging Memory Growth and Mitigation Strategies

This article analyzes the memory increase observed after enabling Log4j2 asynchronous logging in Java services, examines root causes such as thread‑local reuse and large char[] allocations, and presents configuration and code changes—including disabling thread‑locals and limiting message size—to prevent heap growth and improve performance.

GCJVMJava
0 likes · 18 min read
Investigation of Log4j2 Asynchronous Logging Memory Growth and Mitigation Strategies
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Jun 9, 2024 · Frontend Development

Debugging Vue2 Memory Leaks on an Industrial IoT Control Machine

This article walks through a real‑world Vue2 memory‑leak case on a 1 GB industrial control device, showing how DOM nodes balloon during tab switches, how Chrome DevTools can pinpoint the leaking components, and which three code changes finally eliminate the leak.

Chrome DevToolsJavaScriptMemory Leak
0 likes · 7 min read
Debugging Vue2 Memory Leaks on an Industrial IoT Control Machine
vivo Internet Technology
vivo Internet Technology
Apr 24, 2024 · Big Data

Analysis and Resolution of a FileSystem‑Induced Memory Leak Causing OOM in Production

The article details how repeatedly calling FileSystem.get(uri, conf, user) created distinct UserGroupInformation objects, inflating the static FileSystem cache and causing a heap‑memory leak that triggered an Out‑Of‑Memory error, and explains that using the two‑argument get method or explicitly closing instances resolves the issue.

FilesystemHadoopJava
0 likes · 13 min read
Analysis and Resolution of a FileSystem‑Induced Memory Leak Causing OOM in Production
Tencent Cloud Developer
Tencent Cloud Developer
Apr 23, 2024 · Backend Development

Performance Optimization of the qs Library: A 5× Speedup Case Study

A Tencent engineer fixed a severe memory‑leak in the qs library’s encode function by processing 30 MB strings in 1024‑character chunks, reducing heap usage from 2.5 GB to 0.48 GB and cutting runtime from 7.9 s to 2.1 s, achieving a five‑fold speedup and memory reduction, and contributed the change as an open‑source pull request.

JavaScriptMemory LeakNode.js
0 likes · 10 min read
Performance Optimization of the qs Library: A 5× Speedup Case Study
IT Services Circle
IT Services Circle
Apr 17, 2024 · Databases

Comprehensive Didi Interview Review: Redis Persistence, Data Types, Memory Issues, and System Concepts

This article summarizes a Didi second‑round interview covering Redis persistence mechanisms, data structures, memory overflow and leak concepts, thread safety, process vs thread differences, deadlock prevention, TCP/UDP distinctions, and a couple of hand‑written algorithm problems, providing detailed explanations and code examples.

Data StructuresDatabaseInterview
0 likes · 19 min read
Comprehensive Didi Interview Review: Redis Persistence, Data Types, Memory Issues, and System Concepts
vivo Internet Technology
vivo Internet Technology
Mar 19, 2024 · Backend Development

Java 8 Memory Management and Garbage Collection Analysis

The article offers a thorough overview of Java 8 memory management, detailing JVM memory regions, object eligibility, major garbage‑collection algorithms and generational models, comparing Serial, Parallel, CMS and G1 collectors, and presenting practical heap‑dump analysis techniques for diagnosing leaks and performance issues.

GC AlgorithmsGarbage CollectionJVM
0 likes · 29 min read
Java 8 Memory Management and Garbage Collection Analysis
Top Architect
Top Architect
Feb 20, 2024 · Backend Development

JVM Garbage Collection Tuning Experience: Reducing FullGC Frequency and Solving Memory Leaks

Over a month of systematic JVM tuning, the author reduced FullGC frequency from 40 times per day to once every ten days, halved YoungGC time, identified and fixed a memory leak caused by anonymous inner‑class listeners, and documented the step‑by‑step optimization process with configuration changes and performance results.

Garbage CollectionJVMJava
0 likes · 12 min read
JVM Garbage Collection Tuning Experience: Reducing FullGC Frequency and Solving Memory Leaks