# 메모리 및 성능 (Flutter) > 메모리 누수, dispose, DevTools profiler, 위젯 재빌드, const constructors, keys - 22 면접 질문 - Senior - [면접 질문: Flutter](https://sharpskill.dev/ko/technologies/flutter/interview-questions.md) ## 1. AnimationController에서 메모리 누수를 방지하기 위해 dispose()에서 호출해야 하는 메서드는 무엇입니까? **답변** AnimationController의 dispose() 메서드는 리스너와 내부 타이머를 포함하여 애니메이션 컨트롤러와 관련된 리소스를 해제합니다. 이 호출이 없으면 위젯이 소멸된 후에도 컨트롤러가 백그라운드에서 계속 실행되어 메모리 누수가 발생하며, 컨트롤러가 제거된 위젯을 업데이트하려고 할 경우 오류가 발생할 수 있습니다. ## 2. 메모리 누수를 식별할 수 있는 Flutter DevTools 도구는 무엇입니까? **답변** Flutter DevTools의 Memory Profiler는 애플리케이션의 메모리 사용량을 상세하게 보여줍니다. heap 스냅샷을 캡처하고, 메모리 내 객체를 분석하며, garbage collector가 회수하지 않는 인스턴스를 감지하고, 메모리 해제를 막는 참조를 식별할 수 있습니다. ## 3. Flutter에서 불필요한 위젯 재빌드를 줄이려면 어떻게 해야 합니까? **답변** 위젯 생성자 앞에 const를 사용하면 프레임워크가 build마다 새 인스턴스를 만드는 대신 동일한 인스턴스를 재사용할 수 있습니다. Flutter가 위젯이 변경되지 않았음을 인식하므로 불필요한 재빌드를 방지합니다. const 위젯은 컴파일 시점에 생성되어 재사용을 위해 메모리에 보관됩니다. ## 19개 추가 질문 이용 가능 - StreamController로 인한 메모리 누수의 주요 원인은 무엇입니까? - 재정렬 가능한 항목이 있는 ListView의 성능을 최적화하려면 어떤 유형의 Key를 사용해야 합니까? 무료로 가입하기: https://sharpskill.dev/ko/login ## 기타 Flutter 면접 주제 - [Dart 기초](https://sharpskill.dev/ko/technologies/flutter/interview-questions/dart-basics.md): 25개 질문, Junior - [Dart 언어 핵심](https://sharpskill.dev/ko/technologies/flutter/interview-questions/dart-language-essentials.md): 15개 질문, Junior - [Flutter 기초](https://sharpskill.dev/ko/technologies/flutter/interview-questions/flutter-fundamentals.md): 18개 질문, Junior - [위젯 생명주기](https://sharpskill.dev/ko/technologies/flutter/interview-questions/widget-lifecycle.md): 20개 질문, Junior - [로컬 스토리지](https://sharpskill.dev/ko/technologies/flutter/interview-questions/local-storage.md): 20개 질문, Junior - [애플리케이션 생명주기](https://sharpskill.dev/ko/technologies/flutter/interview-questions/app-lifecycle.md): 20개 질문, Junior - [Layouts & Constraints](https://sharpskill.dev/ko/technologies/flutter/interview-questions/layouts-constraints.md): 24개 질문, Mid-Level - [ListView & GridView](https://sharpskill.dev/ko/technologies/flutter/interview-questions/listview-gridview.md): 25개 질문, Mid-Level - [내비게이션 및 라우팅](https://sharpskill.dev/ko/technologies/flutter/interview-questions/navigation-routing.md): 22개 질문, Mid-Level - [기본 상태 관리](https://sharpskill.dev/ko/technologies/flutter/interview-questions/state-management-basics.md): 22개 질문, Mid-Level - [Provider 패턴](https://sharpskill.dev/ko/technologies/flutter/interview-questions/provider-pattern.md): 18개 질문, Mid-Level - [Networking & HTTP](https://sharpskill.dev/ko/technologies/flutter/interview-questions/networking-http.md): 20개 질문, Mid-Level - [JSON 직렬화](https://sharpskill.dev/ko/technologies/flutter/interview-questions/json-serialization.md): 20개 질문, Mid-Level - [로컬 데이터베이스](https://sharpskill.dev/ko/technologies/flutter/interview-questions/local-database.md): 22개 질문, Mid-Level - [폼과 유효성 검사](https://sharpskill.dev/ko/technologies/flutter/interview-questions/forms-validation.md): 20개 질문, Mid-Level - [애니메이션](https://sharpskill.dev/ko/technologies/flutter/interview-questions/animations.md): 20개 질문, Mid-Level - [Firebase 통합](https://sharpskill.dev/ko/technologies/flutter/interview-questions/firebase-integration.md): 18개 질문, Mid-Level - [유닛 테스트](https://sharpskill.dev/ko/technologies/flutter/interview-questions/unit-testing.md): 20개 질문, Mid-Level - [위젯 테스트](https://sharpskill.dev/ko/technologies/flutter/interview-questions/widget-testing.md): 18개 질문, Mid-Level - [빌드 및 배포](https://sharpskill.dev/ko/technologies/flutter/interview-questions/build-deployment.md): 16개 질문, Mid-Level - [패키지 관리](https://sharpskill.dev/ko/technologies/flutter/interview-questions/package-management.md): 16개 질문, Mid-Level - [Streams & RxDart](https://sharpskill.dev/ko/technologies/flutter/interview-questions/streams-rxdart.md): 24개 질문, Senior - [고급 State Management](https://sharpskill.dev/ko/technologies/flutter/interview-questions/advanced-state-management.md): 26개 질문, Senior - [Flutter Design Patterns](https://sharpskill.dev/ko/technologies/flutter/interview-questions/flutter-design-patterns.md): 24개 질문, Senior - [성능 최적화](https://sharpskill.dev/ko/technologies/flutter/interview-questions/performance-optimization.md): 26개 질문, Senior - [Platform Channels](https://sharpskill.dev/ko/technologies/flutter/interview-questions/platform-channels.md): 20개 질문, Senior - [Custom Painting](https://sharpskill.dev/ko/technologies/flutter/interview-questions/custom-painting.md): 22개 질문, Senior - [Flutter 애플리케이션 아키텍처](https://sharpskill.dev/ko/technologies/flutter/interview-questions/flutter-app-architecture.md): 22개 질문, Senior --- Source: SharpSkill (https://sharpskill.dev), tech interview preparation for your real stack. HTML version of this page: https://sharpskill.dev/ko/technologies/flutter/interview-questions/memory-performance