Layer-backed NSBox leaks memory when being used on a view of a document-based app
| Originator: | kastansn | ||
| Number: | rdar://15910633 | Date Originated: | 01/26/2014 |
| Status: | Open | Resolved: | |
| Product: | OS X SDK | Product Version: | 10.9 |
| Classification: | Other | Reproducible: | Always |
Summary: When using a layer-backed standard NSBox control (dragged from the Interface Builder palette) on a document view of a document-based cocoa application, App Kit leaks memory whenever a document is opened and closed. Steps to Reproduce: 1. Start Xcode 5 and create a new document-based cocoa application 2. In Interface Builder, add a single NSBox to its document’s .xib by dragging one from the component palette onto the document view 3. Still in Interface Builder, select the NSBox and open the View Effects Inspector by pressing ⌥⌘8. Set the appropriate checkbox (second from top) to make this NSBox have a core animation layer 4. Profile the app with Instruments using the „Leaks“ template 5. Create and destroy several instances of the document by pressing ⌘N and ⌘W respectively 5. Inspect the resulting leaks in Instruments: after every close of a document among other leaks NSBox’ _updateBackgroundView leaks 640 bytes of memory. Expected Results: There shouldn't be any memory leak. Actual Results: Instruments shows that there are memory leaks within AppKit and QuartzCore. Version: OS X 10.9.1
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!