-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix memory leak #667
Fix memory leak #667
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- It's probably worth mentioning that implementing
Closeable
only helps because bothMetafix
andMetamorph
treat those resources specially by closing them when the stream gets closed. Otherwise, just implementing the interface wouldn't do anything. - Not all maps are actually closable or should be forced to pretend to be. We should let each map implementation decide for itself (cf.
SqlMap
andJndiSqlMap
). If you're implementingCloseable
, you may also want to implementAutoCloseable
as well.Closeable
extendsAutoCloseable
|
Well, but they can be (and are) used standalone. I don't think we should dismiss this option offhand.
Because not all maps have to be closable. It's not a property of
I have to admit, I don't understand this part. Where would the API break be if the maps don't even implement But please note that these were only suggestions. If you're not persuaded, feel free to ignore. Just one thing, though: Maps that only implement |
Let those maps who are concerned implement Closeable.
b4ee6dd
to
b326093
Compare
Rewritten and force pushed after discussion with @blackwinter - please review again if it's good now. |
Sorry @fsteeg , realized too late that you were assigned ... I am positive that one good review is enough, but you may want to complain about the code, we are agil and can change anything. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am positive that one good review is enough
Yes, I agree 👍
Let maps implement Closeable.
Fixes #666.