2 Replies Latest reply on Feb 2, 2006 1:52 PM by Tom Baeyens

    Memory leak with jBMP 3.1 beta 2

    Emmanuel Hodé Newbie

      Hi,

      I found a memory leak in jbmp.db.MessagingSession, but I don't know how and where I can create an issue, so I post it here.

      The memory leak comes form nextMessage method : it opens a Query iterator from Hibernate, but takes only 2 messages. So if there are more than 2 messages available, the iterator is never closed (Hibernate closes it only when it read the last element) and neither the opened ResultSet.

      Here is the missing code to add at the end of nextMessage method :

       if (iter.hasNext()) {
       Hibernate.close(iter);
       }
      


      Best Regards,

      Emmanuel