-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description:
The app has potential memory leaks (Handler cleanup, resource management) but lacks automated detection during development.
Benefits of LeakCanary:
- Automatic memory leak detection
- Detailed leak traces and analysis
- Helps identify Handler, Activity, and resource leaks
- Essential for POS apps that run continuously
Fix Instructions:
- Add LeakCanary dependency to build.gradle:
dependencies {
// Debug builds only
debugImplementation "com.squareup.leakcanary:leakcanary-android:2.12"
}-
LeakCanary automatically initializes, no code changes needed
-
Test scenarios prone to leaks:
- Rapidly opening/closing activities
- NFC operations with card tap/remove cycles
- Network operations during app backgrounding
- Handler-based operations
Testing Priority:
- ModernPOSActivity (main POS interface)
- PaymentRequestActivity (payment flows)
- BalanceCheckActivity (NFC operations)
- Activities with Handler usage
Implementation:
- Debug builds only (no impact on release)
- Provides heap dump analysis
- Shows leak traces in notifications
Priority: High - critical for identifying existing memory leaks
Metadata
Metadata
Assignees
Labels
No labels