Pointer Swizzling - Methods of Swizzling

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:

    “A woman might claim to retain some of the child’s faculties, although very limited and defused, simply because she has not been encouraged to learn methods of thought and develop a disciplined mind. As long as education remains largely induction ignorance will retain these advantages over learning and it is time that women impudently put them to work.”
    —Germaine Greer (b. 1939)

    “The ancient bitter opposition to improved methods [of production] on the ancient theory that it more than temporarily deprives men of employment ... has no place in the gospel of American progress.”
    —Herbert Hoover (1874–1964)