swift: unclear on what a copy of a dictionary is -
ieaccording i've read, swift dictionaries copied simple assignment constant or variable. questions i've perused have seemed indicate well. me, copy seem indicate can change values in copy while original remains untouched.
i have dictionary of type [string: scnnode]. make copy. move node in so-called copy. when check position of same node in original, has moved. not desirable.
i've seen inferences shallow versus deep copies @ least answers stated swift making deep copy here. guide states effect equivalent of deep copying done when swift deems necessary. shed light on this?
what i'll want original dictionary of type [string: [scnnode]] not mutated. i'd create standalone dictionaries [string: scnnode] chosen items in original dictionary.
thanks, byrne
Comments
Post a Comment