UIDynamicBehavior has an unsafe relationship with its dynamic animator.
| Originator: | jerry | ||
| Number: | rdar://15827284 | Date Originated: | 15-Jan-2014 |
| Status: | Open | Resolved: | |
| Product: | iOS SDK | Product Version: | 7 |
| Classification: | Reproducible: | Always |
Summary: If a UIDynamicBehavior outlives its dynamicAnimator, it maintains an unsafe dangling pointer. Steps to Reproduce: 1. Setup a dynamic animator and any UIDynamicBehavior behavior. 2. Keep a strong reference to the behavior 3. Let the dynamic animator deallocate 4. Reference a property (or call a method) on the value returned by the retained behavior's dynamicAnimator property. Expected Results: The dynamicAnimator returned by the behavior should either be a valid pointer to a dynamicAnimator, or nil. Actual Results: The value returned by dynamicAnimator is a dangling pointer. Version: iOS 7 SDK. Notes: Configuration: Attachments: https://github.com/jerryhjones/BadGravity
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!