To better understand the concept of ownership, look at the stack of stacks data structure together with objects owned by each element.
为了更好地理解所有权关系的概念,可以将栈中栈数据结构与每个元素所拥有的对象结合起来。
This simple design, possible because the data obeys strict LIFO order, means that no complex data structure is needed to track stack contents - a simple pointer to the top of the stack will do.
这种简单的设计,很有可能是考虑到数据操作都符合后进先出(LIFO )规则,这意味着访问栈的内容并不需要复杂的数据结构,一个简单的栈顶指针就能搞定一切。
If you want to keep track of the relative nesting and context in which a tag occurs, you need to maintain your own stack, or other data structure.
如果要跟踪标签出现的相关嵌套和上下文,您必须维护自己的栈或者其他数据结构。
应用推荐