Methods of Swizzling
Swizzling in the general case can be complicated. The reference graph of pointers might contain an arbitrary number of cycles; this complicates maintaining a mapping from the old unswizzled values to the new addresses. Associative arrays are useful for maintaining the mapping, while algorithms such as breadth-first search help to traverse the graph, although both of these require extra storage. Various serialization libraries provide general swizzling systems. In many cases, however, swizzling can be performed with simplifying assumptions, such as a tree or list structure of references.
The different types of swizzling are:
- Automatic swizzling
- On-demand swizzling
Read more about this topic: Pointer Swizzling
Famous quotes containing the words methods of and/or methods:
“I believe in women; and in their right to their own best possibilities in every department of life. I believe that the methods of dress practiced among women are a marked hindrance to the realization of these possibilities, and should be scorned or persuaded out of society.”
—Elizabeth Stuart Phelps (18441911)
“The methods by which a trade union can alone act, are necessarily destructive; its organization is necessarily tyrannical.”
—Henry George (18391897)