Smart Reference Pattern

A smart reference is a replacement for a simple pointer that performs additional actions when an object is accessed. Typical uses include:

  • Counting the number of references to the real object,
  • Loading a persistent object into memory when it's first referenced
  • Checking that the real object is locked before it's accessed to ensure that no other object can change it
  • etc

It is basically a combination of counting proxy, virtual proxy, protection proxy, etc.

See: Proxy

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License