I've filed FB9704004 about this. > -[NSCursor set] appears to be leaking images, causes 70GB leak in Firefox > > This appears to be a regression in one of the recent macOS Monterey Betas. > > Two Firefox users reported a very large memory usage. We’re tracking this in https://bugzilla.mozilla.org/show_bug.cgi?id=1735345 . > We have a memory report which blames theallocations on this stacks: > > #02: _malloc_zone_malloc[/usr/lib/system/libsystem_malloc.dylib +0x1e770] > #03: createImageWithSizeRenderInstructions[/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x7430] > #04: -[_AXFMouseCursorGeneratorLayer _createImageForScale:color:][/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x66e0] > #05: -[_AXFMouseCursorGenerator createImageForScale:][/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x5064] > #06: -[_AXFMouseCursorGenerator _registerWithName:connection:isGlobal:setActive:seed:][/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x5418] > #07: _AXFCursorSetAndReturnSeed[/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x70b8] > #08: _AXInterfaceCursorSetAndReturnSeed[/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices +0x2d1d8] > #09: -[NSCursor _reallySet][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x1e01d0] > #10: -[NSCursor set][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x1e0050] > > Firefox calls -[NSCursor set] very frequently during mouse motions, so many leaked images might accumulate.
Bug 1735345 Comment 18 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I've filed FB9704004 about this. > -[NSCursor set] appears to be leaking images, causes 70GB leak in Firefox > > This appears to be a regression in one of the recent macOS Monterey Betas. > > Two Firefox users reported a very large memory usage. We’re tracking this in https://bugzilla.mozilla.org/show_bug.cgi?id=1735345 . > We have a memory report which blames the allocations on this stack: > > #02: _malloc_zone_malloc[/usr/lib/system/libsystem_malloc.dylib +0x1e770] > #03: createImageWithSizeRenderInstructions[/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x7430] > #04: -[_AXFMouseCursorGeneratorLayer _createImageForScale:color:][/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x66e0] > #05: -[_AXFMouseCursorGenerator createImageForScale:][/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x5064] > #06: -[_AXFMouseCursorGenerator _registerWithName:connection:isGlobal:setActive:seed:][/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x5418] > #07: _AXFCursorSetAndReturnSeed[/System/Library/PrivateFrameworks/AccessibilitySupport.framework/Versions/A/Frameworks/AccessibilityFoundation.framework/Versions/A/AccessibilityFoundation +0x70b8] > #08: _AXInterfaceCursorSetAndReturnSeed[/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices +0x2d1d8] > #09: -[NSCursor _reallySet][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x1e01d0] > #10: -[NSCursor set][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x1e0050] > > Firefox calls -[NSCursor set] very frequently during mouse motions, so many leaked images might accumulate.