Rather than wait for the other thread to finish, the current thread can "help" it out by finishing the operation for it by moving the tail pointer forward (b).
不必等候其他线程完成,当前线程就可以“帮助”它完成操作,把尾指针向前移动(B)。
When clicking the backward and forward buttons for the application, we won't be adding new events to the stack but we will be moving the pointer within the stack.
单击应用程序的后退和前进按钮时,不会在堆栈中添加新的事件,而是移动堆栈的指针。
If we don't need to do a GC, allocation is 1 moving a pointer forward and 2 clearing the memory for the new object.
如果我们不需要进行GC,分配就是1将指针前移2为新对象清除内存。
应用推荐