mirror of
https://gitee.com/arthas/arthas.git
synced 2024-11-30 03:07:37 +08:00
clean object in ObjectStack
This commit is contained in:
parent
ae2c37266b
commit
03cd548ca4
@ -117,7 +117,7 @@ public class TimeTunnelAdviceListener extends AdviceListenerAdapter {
|
||||
*
|
||||
* </pre>
|
||||
*
|
||||
* @author hengyunabc 2019-11-20
|
||||
* @author hengyunabc 2020-05-20
|
||||
*
|
||||
*/
|
||||
static class ObjectStack {
|
||||
@ -147,11 +147,15 @@ public class TimeTunnelAdviceListener extends AdviceListenerAdapter {
|
||||
public Object pop() {
|
||||
if (pos > 0) {
|
||||
pos--;
|
||||
return array[pos];
|
||||
Object object = array[pos];
|
||||
array[pos] = null;
|
||||
return object;
|
||||
} else {
|
||||
pos = cap;
|
||||
pos--;
|
||||
return array[pos];
|
||||
Object object = array[pos];
|
||||
array[pos] = null;
|
||||
return object;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user