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:

    If men got pregnant, there would be safe, reliable methods of birth control. They’d be inexpensive, too.
    Anna Quindlen (b. 1952)

    Cold and hunger seem more friendly to my nature than those methods which men have adopted and advise to ward them off.
    Henry David Thoreau (1817–1862)