Methods strongly capture associated Class instance
| Originator: | jarinteractive | ||
| Number: | rdar://17238339 | Date Originated: | |
| Status: | Open | Resolved: | |
| Product: | Swift | Product Version: | |
| Classification: | Reproducible: |
Summary: When in instance method is passed to a function that accepts closures/functions, the passed method's class instance is captured strongly. Steps to Reproduce: 1. Pass a method to a function that strongly captures the method. 2. Remove all other references to the instance of the class containing the method. Expected Results: The instance should be deallocated (or there should be a way to specify that the instance is not captured strongly by the method) Actual Results: The instance is not deallocated Version: 8.0 (12A4265u) Notes: See attached project for a test exhibiting this behavior Configuration: any Attachments: 'FunctionExample.zip' was successfully uploaded.
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!