Skip to content
Search

Proxy pattern

lastmod 2015-08-25created 2015-08-251 edits

In computer programming, the proxy pattern is a software design pattern.

In general, a proxy is a class that acts as an interface to something else. A proxy can act as an interface to anything (for example, a network connection, a large object in memory, a file, or some other resource that cannot be duplicated or is in high demand).

A well-known example of the proxy pattern is a reference-counting smart pointer object.

In situations where multiple copies of a complex object must exist, the proxy pattern can be combined with the flyweight pattern to reduce the application's memory usage.

Favorite site