每当利用new分配一个对象时,您就得问自己,谁将删除该对象?何时删除?
Whenever you allocated an object with new, you had to ask yourself, who will delete this object and when?
引用计数(reference counting)是对一个给定的对象当前有多少指向它的引用保留有一个计数,然后当最后一个引用被释放时自动删除该对象。
Reference counting involves keeping a count of how many references to a given object are extant, then deleting the object automatically after the last one is released.
您在子工作区中所删除的对象,只能在不能得到的该工作区中(就是说,删除了)标记;但是,对象仍然存在于它的上级工作区中。
Objects that you delete in the child Workspace are only flagged in that Workspace as not being available (that is, deleted); however, the object still exists in its parent Workspace.
应用推荐