This page is no longer maintained — Please continue to the home page at

Good practice of actors to avoid from memory leaks

No replies
Rinat Tainov
Joined: 2011-05-04,
User offline. Last seen 42 years 45 weeks ago.

All started in writing system with big amount of actors, realized that
I am sending message without case to handle in react, and tried to
find good solution to avoid that problems. I decided to implement
something like default case:
//for each actor
//all cases
case msg: Any => Spam!msg
Then implement Spam actor:
object Spam extends Actor{
def act{
case spam: Any => logSpam(spam)//or save to database

Full version of question you can find here

Is it good practice or is scala has some native way to handle such

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland