Andreas Sinz
03/12/2018, 12:08 PMobject
is initialized when you first access it and is available until the process is terminated. subsequent accesses just reuse the only instance of the object
. Using an object
to share data feels like mutable shared state (songs
and songsMap
is mutable) which can lead to strange errors/race conditions