remove memory leak of consumers & browsers

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@433198 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-08-21 08:40:08 +00:00
parent bc005fd1e6
commit 8043380127
1 changed files with 2 additions and 0 deletions

View File

@ -87,11 +87,13 @@ public class PooledSession implements TopicSession, QueueSession {
MessageConsumer consumer = (MessageConsumer) iter.next(); MessageConsumer consumer = (MessageConsumer) iter.next();
consumer.close(); consumer.close();
} }
consumers.clear();
for (Iterator iter = browsers.iterator(); iter.hasNext();) { for (Iterator iter = browsers.iterator(); iter.hasNext();) {
QueueBrowser browser = (QueueBrowser) iter.next(); QueueBrowser browser = (QueueBrowser) iter.next();
browser.close(); browser.close();
} }
browsers.clear();
// maybe do a rollback? // maybe do a rollback?
if (transactional) { if (transactional) {