The ActorRef won't prevent the Actor-instance from being garbage-collected.
But if you want to avoid hanging onto stale ActorRefs I'd recommend using
Death Watch and remove the refs as they are reported in as dead.

On Sun, Nov 19, 2017 at 8:13 PM, Joseph Mansigian <
joseph.c.mansig...@gmail.com> wrote:

> I have a Play Framework Scala application in development that stores long
> lived ActorRefs in a mutable Map. When an actor is no longer needed it is
> sent it a message that informs it to stop itself and it will.
>
> My concern is about the visibility of stopped actors to JVM garbage
> collection; especially those whose ActorRefs are enclosed within a
> Collection,
>
> What do I need to do if  ActorRefs are ( hidden ? ) inside a Scala
> Collection?
>
> --
> >>>>>>>>>> Read the docs: http://akka.io/docs/
> >>>>>>>>>> Check the FAQ: http://doc.akka.io/docs/akka/
> current/additional/faq.html
> >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to