Companion Objects for Actor

49 views
Skip to first unread message

Sarit Seal

unread,
May 5, 2015, 11:12:07 AM5/5/15
to akka...@googlegroups.com
Hi,

How does Akka ensure the actors are not garbage collected. I see the actors not vanishing even if it does not receive any message for a long time.

Regards
Sarit

Akka Team

unread,
May 5, 2015, 11:15:43 AM5/5/15
to akka-dev
Hi Sarit,

Actors are part of an internal hierarchy (basically the supervision hierarchy) so parent actors always reference their children, therefore preventing them from being GCed. There is a "root" which is referenced by the ActorSystem itself. This is why it is important to explicitly stop actors, otherwise they are not collected.

Of course there are other fine details, like the threadpools used, etc. but the above explanation is more or less correct.

-Endre

--
You received this message because you are subscribed to the Google Groups "Akka Developer List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to akka-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Akka Team
Typesafe - Reactive apps on the JVM
Blog: letitcrash.com
Twitter: @akkateam

dario...@me.com

unread,
May 5, 2015, 11:18:44 AM5/5/15
to akka...@googlegroups.com
Hi Sarit,

that's because it's still being referenced in the actor system. 

Cheers,
Dario
--
Reply all
Reply to author
Forward
0 new messages