jon * wrote:
> 
> on 3/24/00 10:27 AM, Scott C. Tavares <[EMAIL PROTECTED]> wrote:
> 
> > I always thought the purpose of a Singleton is not so much to stay cached in
> > memory but to disallow multiple instances of its-self to ever be
> > instantiated at any point in time. What this buys you is that, say you have
> > multiple concurrent users all using trying to use the same object, the
> > Singleton pattern will make sure that they all share the same instance
> > instead of a new instance for each user. Does this make since or am I way
> > off here?
> >
> > -Scott-
> 
> You are right on, but it also retains a reference to itself which should
> cause it to not get GC'd...

Not if it is a static reference... which it has to be.  The second no
other object hits it she gets GC.

Kevin

-- 
Kevin A Burton ([EMAIL PROTECTED])
http://relativity.yi.org
Message to SUN:  "Please Open Source Java!"
"For evil to win is for good men to do nothing."


------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to