fix: macos ptr access
This commit is contained in:
parent
6fd900c479
commit
4f059a9138
6 changed files with 72 additions and 56 deletions
|
|
@ -62,10 +62,8 @@ public class TextureRgbaRendererPlugin: NSObject, FlutterPlugin {
|
|||
if (textureRgba == nil) {
|
||||
result(0)
|
||||
} else {
|
||||
let ptr = withUnsafePointer(to: textureRgba!) { p in
|
||||
return UnsafeRawPointer(p);
|
||||
};
|
||||
let intAddr = UInt(bitPattern: ptr)
|
||||
let unmanaged = Unmanaged.passUnretained(textureRgba!)
|
||||
let intAddr = UInt(bitPattern: unmanaged.toOpaque())
|
||||
result(intAddr)
|
||||
}
|
||||
default:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue