https://bugs.kde.org/show_bug.cgi?id=520075
--- Comment #1 from [email protected] --- Created attachment 192228 --> https://bugs.kde.org/attachment.cgi?id=192228&action=edit Heap dump after applying the proposed fix (Scenario: navigate to DeviceFragment, back, navigate again, force GC). Only one live DeviceFragment instance remains (the currently active one, depth 7). No leak warning. The orphaned instances visible before forced GC were depth-disconnected and reclaimed by the GC pass, confirming they were not retained from GC roots. Compare with the pre-fix attachment showing 2 live instances with the leaked one retained via the CopyOnWriteArrayList backing array. Empirical verification of the proposed fix attached. After applying the defensive remove-then-add pattern in DeviceFragment.onViewCreated, the leak no longer manifests: navigating to DeviceFragment, back, and back again, followed by a heap dump and forced GC, leaves only the single currently-active DeviceFragment instance in memory. No leak warning from Android Studio's heap analyzer. A merge request will follow shortly. -- You are receiving this mail because: You are watching all bug changes.
