Does the Swift "as" type casting operator keep the underlying memory intact?

Viewed 39

If I use "as" in all of it's forms... "as?", "as!"... is there a guarantee that the underlying memory bits are not modified?

For example when doing String as NSString, is there some runtime code that is executed in order to make the change possible or is the memory laid out in a way that no change is required, so there is no cost to the operation.

0 Answers
Related