UnsafePointer & Structs
would anyone be able to help me understand what is happening here? why are the outputs of the two print statements different?
The output is:
3 Replies
if I change label to be an Int, it works fine
I've tried this
and it gives me :
I guess the difference is in :
I think you hit a bug of Mojo's ASAP destruction:
x
is deleted on the line var y = x.next("y")
Try adding _ = x; _ = y
to the end of your file