#2406 - Memory leak in Query.findEach

This commit is contained in:
Rob Bygrave committed 2021-10-08 11:20:54 +13:00
1 parent 0a0d67585c
commit 2549eace09
3 files changed
+36 -9

No files matched your search

@@ -201,14 +201,6 @@ public final class OrmQueryRequest<T> extends BeanRequest implements SpiOrmQuery
return persistenceContext;
}
/**
* Add the bean to the persistence context.
*/
public void persistenceContextAdd(EntityBean bean) {
Object id = beanDescriptor.getId(bean);
beanDescriptor.contextPut(persistenceContext, id, bean);
}
/**
* This will create a local (readOnly) transaction if no current transaction
* exists.
@@ -416,7 +416,6 @@ public final class CQuery<T> implements DbReadContext, CancelableQuery, SpiProfi
} else {
// nextBean set to previously read currentBean
nextBean = currentBean;
request.persistenceContextAdd(nextBean);
// check the current row we have just moved to
if (checkForDifferentBean()) {
return true;