Yes, ideally this is done by Swift itself behind the scenes, just imagine doesntMutate takes several pointer parameters:
withUnsafePointer(to: a) { a in
withUnsafePointer(to: b) { b in
withUnsafePointer(to: c) { c in
doesntMutate(a, b, c)
}
}
}
Found this old thread.