File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/main/java/org/truffleruby/core Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ public ReferenceProcessingService<MarkerReference> service() {
85
85
86
86
private Object [] keptObjects ;
87
87
@ SuppressWarnings ("unused" )
88
- private Object [] oldKeptObjects = null ;
88
+ private final ArrayDeque < Object []> oldKeptObjects = new ArrayDeque < Object []>() ;
89
89
90
90
private int counter = 0 ;
91
91
@@ -118,7 +118,7 @@ public void popStackPreservationFrame() {
118
118
119
119
public synchronized void runAllMarkers () {
120
120
counter = 0 ;
121
- oldKeptObjects = keptObjects ;
121
+ oldKeptObjects . push ( keptObjects ) ;
122
122
keptObjects = new Object [cacheSize ];
123
123
MarkerReference currentMarker = getFirst ();
124
124
MarkerReference nextMarker ;
@@ -130,7 +130,7 @@ public synchronized void runAllMarkers() {
130
130
}
131
131
currentMarker = nextMarker ;
132
132
}
133
- oldKeptObjects = null ;
133
+ oldKeptObjects . pop () ;
134
134
}
135
135
136
136
public void addMarker (DynamicObject object , MarkerAction action ) {
You can’t perform that action at this time.
0 commit comments