144 |
RTList<ScriptEvent>::Iterator it = pEvents->allocAppend(); |
RTList<ScriptEvent>::Iterator it = pEvents->allocAppend(); |
145 |
it->reset(); |
it->reset(); |
146 |
} |
} |
|
pEvents->clear(); |
|
147 |
} |
} |
148 |
|
pEvents->clear(); // outside of upper block, as loop below must always start from cleared list |
149 |
|
|
150 |
// create new VM execution contexts for new script |
// create new VM execution contexts for new script |
151 |
while (!pEvents->poolIsEmpty()) { |
while (!pEvents->poolIsEmpty()) { |
184 |
pEvents->clear(); |
pEvents->clear(); |
185 |
while (!pEvents->poolIsEmpty()) { |
while (!pEvents->poolIsEmpty()) { |
186 |
RTList<ScriptEvent>::Iterator it = pEvents->allocAppend(); |
RTList<ScriptEvent>::Iterator it = pEvents->allocAppend(); |
187 |
|
if (!it) break; |
188 |
if (it->execCtx) { |
if (it->execCtx) { |
189 |
// free VM execution context object |
// free VM execution context object |
190 |
delete it->execCtx; |
delete it->execCtx; |
191 |
it->execCtx = NULL; |
it->execCtx = NULL; |
192 |
// free C array of handler pointers |
// free C array of handler pointers |
193 |
delete [] it->handlers; |
delete [] it->handlers; |
194 |
|
it->handlers = NULL; |
195 |
} |
} |
196 |
} |
} |
197 |
pEvents->clear(); |
pEvents->clear(); |