You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following should be submitted to Apple as a bug radar.
Bug
Setting an SKScene as the contents of an SCNMaterialProperty leads to numerous retain cycles in internal SceneKit and SpriteKit classes.
Steps to Reproduce
Set up an SKScene with a single SKVideoNode child.
Set up an SCNNode using a primitive geometry.
Assign the SKScene as the contents of the SCNNode’s geometry.firstMaterial.diffuse.contents.
Relinquish all references to the SKScene and SCNNode.
Expected Behavior
The SKScene and the SCNNode should be deallocated.
Actual Result
The SKScene and many other instances are leaked due to numerous retain cycles.
Notes
Please run the attached sample code on iOS 10. You can see the retain cycles plainly illustrated using Xcode 8's visual memory debugger. The Leaks instrument will also show some of these leaks when running on a real device running iOS 10. I have not been able to get Instruments to report a leak on iOS 9, and intermittently on iOS 10. However, the visual memory debugger in Xcode 8 always reveals the retain cycles.
You can verify that SCNMaterialProperty.contents is the culprit by commenting out Line 63 in PlayerScene.m.
The following should be submitted to Apple as a bug radar.
Bug
Setting an SKScene as the contents of an SCNMaterialProperty leads to numerous retain cycles in internal SceneKit and SpriteKit classes.
Steps to Reproduce
geometry.firstMaterial.diffuse.contents
.Expected Behavior
The SKScene and the SCNNode should be deallocated.
Actual Result
The SKScene and many other instances are leaked due to numerous retain cycles.
Notes
Please run the attached sample code on iOS 10. You can see the retain cycles plainly illustrated using Xcode 8's visual memory debugger. The Leaks instrument will also show some of these leaks when running on a real device running iOS 10. I have not been able to get Instruments to report a leak on iOS 9, and intermittently on iOS 10. However, the visual memory debugger in Xcode 8 always reveals the retain cycles.
You can verify that SCNMaterialProperty.contents is the culprit by commenting out Line 63 in PlayerScene.m.
Uploads
Sample Project: https://www.dropbox.com/s/1j0ib2ojbr1xbym/Memory%20Leak.zip?dl=0
Screenshot
The text was updated successfully, but these errors were encountered: