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
Fix warning "initialization of '...' results in a dangling pointer"
- When taking an UnsafePointer to an array etc, the array could be
deallocated whilst the pointer is still in use. This is fixed by
either:
1. Eliminating the pointer entirely and just passing the array or
&array to the function.
2. Creating and using the pointer inside a .withUnsafeBytes {}
or .withUnsafeMutableBytes {} closure.
0 commit comments