spring-projects / spring-integration-extensions

The Spring Integration Extensions project provides extension components for Spring Integration
http://www.springintegration.org/
280 stars 266 forks source link

spring-integration-smb memory leak in SmbShare #225

Closed beardy247 closed 4 years ago

beardy247 commented 4 years ago

Hi,

I've been experiencing a memory leak generated by SmbSession. I wasn't using a CachingSessionFactory so each poll was causing a leak due to the open file blocking the thread from finalizing. I've tracked it down to this method on SmbShare:

void doClose() {
    this.open.set(false);
}

Looks like the comment is out of date, jcifs.smb.SmbFile close() method is public. Calling super.close() resolves the memory leak.

Thanks, Adam

artembilan commented 4 years ago

Thank you for reporting this observation! We would appreciate if you raise a pull request with respective fix.