> From: Leon Rosenberg [mailto:[EMAIL PROTECTED] 
> Subject: Re: PermGen space [ot]
> 
>  public class ASingletonFactory{
>     private static ASingletonImpl instance = new ASingletonImpl();
>     public static  AsingletonImpl getInstance(){
>        return instance;
>    }
> }
> 
>  public class ASingletonImpl{
>     ASingletonImpl(){
>     }
>     ///real code here
>  }

That does not alter the situation in the least, if any other class
contains a reference to the factory, since the factory contains a
reference to the singleton class.  If the factory is accessed via
reflection rather than direct reference, then both the factory and
singleton can be collected when not in use.  The same could be said for
the previous version of the example.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to