uima-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marshall Schor (JIRA)" <...@uima.apache.org>
Subject [jira] [Commented] (UIMA-6058) Pear destroy does not destroy the resourceManagers
Date Fri, 14 Jun 2019 18:38:00 GMT

    [ https://issues.apache.org/jira/browse/UIMA-6058?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16864345#comment-16864345
] 

Marshall Schor commented on UIMA-6058:
--------------------------------------

The ResourceManager_impl has a reference to a CasManager_impl.  When the ResourceManger destroy()
method is called, it doesn't do anything to the referenced CasManager, because that instance
could be shared with other (non-destroyed) ResourceManagers.

If, in your application, you know when calling a ResourceManager instance's destroy(), that
the referenced CasManager is not shared, and won't be used again, you could null out the reference: 
e.g. my_resource_mgr.setCasManager(null);

This ought to allow the garbage collector to collect the CasManager (and therefore, it's mMetaDataList).

Would this method work for your use case?

> Pear destroy does not destroy the resourceManagers
> --------------------------------------------------
>
>                 Key: UIMA-6058
>                 URL: https://issues.apache.org/jira/browse/UIMA-6058
>             Project: UIMA
>          Issue Type: Bug
>            Reporter: Matthias Koch
>            Priority: Major
>         Attachments: Screenshot_20190614_095220.png, UIMA-6058.diff
>
>
> the pear wrapper is caching resourceManagers which are not getting destroyed on destroy
of the pear wrapper.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message