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

Andrey Davydov commented on FELIX-6243:
---------------------------------------

When FelixConstants.RESOLVER_PARALLELISM is exactly one, Felix object not 
collected by GC too, but I can't understend why. JvisualVM says that it don't 
see GC root for Felix object =((( 

> Link to root Felix object leaks to GC root
> ------------------------------------------
>
>                 Key: FELIX-6243
>                 URL: https://issues.apache.org/jira/browse/FELIX-6243
>             Project: Felix
>          Issue Type: Bug
>    Affects Versions: framework-6.0.3
>            Reporter: Andrey Davydov
>            Priority: Major
>         Attachments: felix.png
>
>
> Tested on java8.
> Felix object creates StatefulResolver and then  StatefulResolver  get link to 
> Felix. 
> StatefulResolver creates Executor in getExecutor() using nested class as 
> ThreadFactory (when FelixConstants.RESOLVER_PARALLELISM greater then 1)
>  
> So every thread in Executor has link to Executor
> Executor has link to ThreadFactory
> ThreadFactory has link to StatefulResolver, because it is nested
> StatefulResolver has link to Felix
>  
> And it is the way from GC root to Felix and GC can't collect Felix after 
> Felix.stop() and all external refs to Felix cut.
>  
>  
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to