Build: Memory Leak Detector
This screen helps detect and prevent memory leaks by showing a counter that updates every second. It includes a toggle button to start and stop the counter. Proper cleanup is implemented to avoid memory leaks.
Target UI
Memory Leak Detector [Counter: 0] [Start Counter]
Display a numeric counter starting at 0
Add a button labeled 'Start Counter' or 'Stop Counter' depending on state
When started, the counter increments by 1 every second
When stopped, the counter stops incrementing
Use useEffect hook with cleanup to prevent memory leaks
Toggle button text changes based on counter running state