-
Georges Basile Stavracas Neto authored
CcObjectStorage is a cache for GObjects. It is meant to store objects that are too expensive to be often created, such as NMClient, GoaClient or D-Bus proxies. CcObjectStorage has a very strict usage pattern. It is a programming error to add an object that is already stored, and so it is to retrieve an object that was not stored. Stored objects are meant to be kept alive during the whole lifetime of GNOME Settings, and CcObjectStorage takes a reference on every stored object to achieve that. If objects are destroyed while they are cached, it means we have a reference mismanagement somewhere. In this sense, CcObjectStorage will act Sam Sheepdog taking care of sneaky wolves trying to steal their sheep-references. Next patches will make various panels and objects around GNOME Settings adopt this new API, and make sure they always disconnect when destroyed.
083e7bda