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

ASF GitHub Bot commented on FELIX-5974:
---------------------------------------

GitHub user timothyjward opened a pull request:

    https://github.com/apache/felix/pull/159

    Provide a refactoring to simplify prototype reference access

    This should also Fix FELIX-5974
    
    Signed-off-by: Tim Ward <timothyjw...@apache.org>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/timothyjward/felix FELIX-5974

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/felix/pull/159.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #159
    
----
commit 1a0973e08353bb0c4e959fb2a01b861c9cfcc39b
Author: Tim Ward <timothyjward@...>
Date:   2018-10-26T12:20:11Z

    Provide a refactoring to simplify prototype reference access
    
    This should also Fix FELIX-5974
    
    Signed-off-by: Tim Ward <timothyjw...@apache.org>

----


> Prototype scope references are not released on deactivation
> -----------------------------------------------------------
>
>                 Key: FELIX-5974
>                 URL: https://issues.apache.org/jira/browse/FELIX-5974
>             Project: Felix
>          Issue Type: Bug
>          Components: Declarative Services (SCR)
>    Affects Versions: scr-2.1.12
>            Reporter: Timothy Ward
>            Priority: Major
>             Fix For: scr-2.1.14
>
>
> Having read the stack overflow question on [Stack 
> Overflow|https://stackoverflow.com/questions/52839641/osgi-ds-prototype-reference-not-released]
>  I was pretty certain that the user must be doing something wrong, but in 
> fact it seems as though SCR does a bad job of releasing Prototype scoped 
> references when a component is disposed.
> I looked into the code, and it seems that there are a lot of conflicting 
> locations where prototype scope services are obtained and released. I propose 
> tidying this up so that the ComponentServiceObjects is *always* used 
> internally regardless of whether it is injected or not. This encapsulates all 
> the access in a single location so it is less likely that the objects will 
> leak.



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

Reply via email to