This is a sample project demonstrating a memory leak that occurs in DEV when attaching listeners to Realm Results/List Objects and reloading the app (CMD+R).
To reproduce:
- Edit App.js
- Uncomment the target use case in
componentWillMount
- (1) Realm listener: Does not leak
- (2) Results listener: Does leak
- (3) List object listener: Does leak
- Display Perf Monitor (CMD+D ->
Show Perf Monitor
) - Reload the app (CMD+R)
- Watch RAM climb on each reload in use cases 2 & 3