Skip to content

dlib.core.ownership

Timur Gafarov edited this page Feb 22, 2018 · 4 revisions

dlib.core.ownership

Object ownership system similar to Delphi's. All classes deriving from Owner can store references to objects implementing Owned interface (and other Owner objects as well). When an owner is deleted, its owned objects are also deleted.

interface Owned

An empty interface that is used to mark objects that can be owned.

class Owner: Owned

Base owner class.

  • void addOwnedObject(Owned obj) - adds owned object.
  • void clearOwnedObjects() - deletes owned objects without deleting owner itself
Clone this wiki locally