You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Laws (JIRA)" <de...@tuscany.apache.org> on 2009/10/16 18:31:31 UTC

[jira] Created: (TUSCANY-3312) Potential memory leak in Java interface handling

Potential memory leak in Java interface handling
------------------------------------------------

                 Key: TUSCANY-3312
                 URL: https://issues.apache.org/jira/browse/TUSCANY-3312
             Project: Tuscany
          Issue Type: Bug
          Components: Java SCA Java Implementation Extension
    Affects Versions: Java-SCA-1.5.1
         Environment: All
            Reporter: Simon Laws
             Fix For: Java-SCA-1.5.2


In JavaInterfaceFactoryImpl there's a cache....

private Map<Class<?>, JavaInterface> cache  = Collections.synchronizedMap(new WeakHashMap<Class<?>, JavaInterface>());

But 

public class JavaInterfaceImpl extends InterfaceImpl implements JavaInterface {

    private String className;
    private Class<?> javaClass;

So it seems that Class<?> javaClass; should really be a weak reference

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TUSCANY-3312) Potential memory leak in Java interface handling

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
    [ https://issues.apache.org/jira/browse/TUSCANY-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12768313#action_12768313 ] 

Simon Laws commented on TUSCANY-3312:
-------------------------------------

The same sort of pattern occurs in 

  JavaElementImpl
  DataTypeImpl
  SCAProxy

So am about to check in fixes for those also

> Potential memory leak in Java interface handling
> ------------------------------------------------
>
>                 Key: TUSCANY-3312
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3312
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.5.1
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-1.5.2
>
>
> In JavaInterfaceFactoryImpl there's a cache....
> private Map<Class<?>, JavaInterface> cache  = Collections.synchronizedMap(new WeakHashMap<Class<?>, JavaInterface>());
> But 
> public class JavaInterfaceImpl extends InterfaceImpl implements JavaInterface {
>     private String className;
>     private Class<?> javaClass;
> So it seems that Class<?> javaClass; should really be a weak reference

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (TUSCANY-3312) Potential memory leak in Java interface handling

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws resolved TUSCANY-3312.
---------------------------------

       Resolution: Fixed
    Fix Version/s: Java-SCA-Next

Fixed in 1.5.2 and 1.x

> Potential memory leak in Java interface handling
> ------------------------------------------------
>
>                 Key: TUSCANY-3312
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3312
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.5.1
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-1.5.2, Java-SCA-Next
>
>
> In JavaInterfaceFactoryImpl there's a cache....
> private Map<Class<?>, JavaInterface> cache  = Collections.synchronizedMap(new WeakHashMap<Class<?>, JavaInterface>());
> But 
> public class JavaInterfaceImpl extends InterfaceImpl implements JavaInterface {
>     private String className;
>     private Class<?> javaClass;
> So it seems that Class<?> javaClass; should really be a weak reference

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (TUSCANY-3312) Potential memory leak in Java interface handling

Posted by "Simon Laws (JIRA)" <de...@tuscany.apache.org>.
     [ https://issues.apache.org/jira/browse/TUSCANY-3312?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Laws reassigned TUSCANY-3312:
-----------------------------------

    Assignee: Simon Laws

> Potential memory leak in Java interface handling
> ------------------------------------------------
>
>                 Key: TUSCANY-3312
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-3312
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Java SCA Java Implementation Extension
>    Affects Versions: Java-SCA-1.5.1
>         Environment: All
>            Reporter: Simon Laws
>            Assignee: Simon Laws
>             Fix For: Java-SCA-1.5.2
>
>
> In JavaInterfaceFactoryImpl there's a cache....
> private Map<Class<?>, JavaInterface> cache  = Collections.synchronizedMap(new WeakHashMap<Class<?>, JavaInterface>());
> But 
> public class JavaInterfaceImpl extends InterfaceImpl implements JavaInterface {
>     private String className;
>     private Class<?> javaClass;
> So it seems that Class<?> javaClass; should really be a weak reference

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.