[
https://issues.apache.org/jira/browse/DERBY-3354?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12585005#action_12585005
]
Øystein Grøvlen commented on DERBY-3354:
----------------------------------------
If I understand correctly, the idea behind using a WeakHashMap is that if this
is the only reference, it should not prevent the referred object from being
garbage-collected.
In other words, as long as a user thread or the network server through
locators, refers to the object, it will not be garbage-collected, but if such
references does not exist, the object will be garbage-collected. This is an
interesting idea.
My question is whether it is OK that free is not called on the LOB objects that
are garbage-collected this way. Are you certain that all associated resources
(e.g., temp files) will be released? Maybe some finalizer clean-up will also
be needed?
Other comments/questions:
* It seems getLocator will create a new locator on every call. I think there
should be just a single locator per object. Otherwise, I think the clean-up
will be difficult.
* free: Willl removeLOBMapping handle correctly the cases where a locator
has not been set?
* typo: Refrence
> Select from large lob table with embedded gives OutOfMemoryError
> ----------------------------------------------------------------
>
> Key: DERBY-3354
> URL: https://issues.apache.org/jira/browse/DERBY-3354
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.3.1.4, 10.3.2.1, 10.4.0.0
> Reporter: Kathey Marsden
> Assignee: Anurag Shekhar
> Attachments: derby-3354.diff, derby-3354_preview.diff, LocLeak.java
>
>
> Retrieving from a large table with lobs gives an OutOfMemoryException, even
> if free() is explictly called on the lob. I believe this is because
> EmbedConnection.addLobMapping is called for every lob creation but is never
> cleared until commit or rollback, even if the lob is freed.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.