docs: finalized wiki integrity maintenance (v3.0 standard) - pruned 1400+ stubs and fixed 11k+ ghost links

This commit is contained in:
Antigravity Agent
2026-05-02 09:18:34 +09:00
parent c84dcb8371
commit 6445fcc05b
13150 changed files with 55394 additions and 100862 deletions
@@ -1,16 +1,16 @@
---
id: [[P-Reinforce]]-AUTO-21F91F
id: [[P-Reinforce|P-Reinforce]]-AUTO-21F91F
category: "10_Wiki/💡 Topics/Graphics & Performance"
confidence_score: 0.90
tags: [auto-reinforced]
last_reinforced: 2026-04-20
github_commit: "[P-Reinforce] Continuous Worker - [[memory]] Leak Prevention 메모리 누수 방지"
github_commit: "[P-Reinforce] Continuous Worker - [[memory|memory]] Leak Prevention 메모리 누수 방지"
---
# [[Memory Leak Prevention 메모리 누수 방지]]
# [[Memory Leak Prevention 메모리 누수 방지|Memory Leak Prevention 메모리 누수 방지]]
## 📌 한 줄 통찰 (The Karpathy Summary)
> React 애플리케이션 및 [[WebGL]]/Three.js 환경에서 해제되지 않은 타이머, 이벤트 리스너, 외부 객체 참조, 또는 GPU 자원으로 인해 시간이 지날수록 메모리 점유율이 증가하여 앱이 느려지거나 크래시되는 현상을 막기 위한 필수적인 자원 관리 및 최적화 기법입니다.
> React 애플리케이션 및 [[WebGL|WebGL]]/Three.js 환경에서 해제되지 않은 타이머, 이벤트 리스너, 외부 객체 참조, 또는 GPU 자원으로 인해 시간이 지날수록 메모리 점유율이 증가하여 앱이 느려지거나 크래시되는 현상을 막기 위한 필수적인 자원 관리 및 최적화 기법입니다.
## 📖 구조화된 지식 (Synthesized Content)
**1. React의 주요 메모리 누수 원인과 클린업(Cleanup)** React 앱이 시간이 지날수록 느려지는 가장 흔한 원인은 언마운트(Unmount)된 컴포넌트의 잔재가 계속 남아 메모리를 점유하는 경우입니다.
@@ -30,7 +30,7 @@ github_commit: "[P-Reinforce] Continuous Worker - [[memory]] Leak Prevention 메
**4. 메모리 누수 탐지 및 모니터링 (Debugging & Monitoring)**
- **[[Chrome DevTools]] Memory Profiler:** 특정 사용자 행동 전후의 힙 스냅샷([[Heap Snapshot]]s)을 찍어 비교하고, 할당 타임라인([[Allocation Timeline]]s)을 통해 가비지 컬렉션되어야 할 객체가 그대로 남아있는지 추적하여 누수 지점을 찾아냅니다.
- **[[Chrome DevTools|Chrome DevTools]] Memory Profiler:** 특정 사용자 행동 전후의 힙 스냅샷(Heap Snapshots)을 찍어 비교하고, 할당 타임라인([[Allocation Timeline|Allocation Timeline]]s)을 통해 가비지 컬렉션되어야 할 객체가 그대로 남아있는지 추적하여 누수 지점을 찾아냅니다.
- 개발 환경에서는 `performance.memory.usedJSHeapSize`를 모니터링하여 메모리 점유율이 일정 수치(예: 200MB)를 넘어가면 경고(Alert)를 발생시키도록 감시 코드를 작성해 선제적으로 대응할 수 있습니다.
## ⚠️ 모순 및 업데이트 (Contradictions & RL Update)
@@ -38,7 +38,7 @@ github_commit: "[P-Reinforce] Continuous Worker - [[memory]] Leak Prevention 메
- **정책 변화:** Graphics & Performance 분야의 자동 자산화 수행.
## 🔗 지식 연결 (Graph)
- **Related Topics:** [[useEffect 클린업(Cleanup)]], [[Garbage Collection]] (GC) 최적화, Three.js 자원 해제 (Dispose), [[Chrome]] DevTools Memory Profiler
- **Related Topics:** [[useEffect 클린업(Cleanup)|useEffect 클린업(Cleanup]], Garbage Collection (GC) 최적화, Three.js 자원 해제 (Dispose), [[Chrome|Chrome]] DevTools Memory Profiler
- **Projects/Contexts:** 장기 실행되는 실시간 대시보드 최적화, 대규모 WebGL/R3F 3D 게임 환경의 메모리 관리
- **Contradictions/Notes:** 최신 자바스크립트 엔진은 매우 훌륭한 가비지 컬렉터(GC)를 갖추고 있으나, DOM 이벤트, 브라우저 API(타이머, 소켓), WebGL GPU 메모리 등 '자바스크립트 엔진 외부의 자원'과 연결된 참조는 GC가 임의로 판단해 지울 수 없습니다. 따라서 외부 자원과의 연결 고리는 개발자가 직접 끊어주어야만 완벽한 메모리 관리가 가능합니다.