Closed stanch closed 10 years ago
Could it be that eta-expanded method gets collected? https://github.com/dylemma/scala.frp/blob/master/src/main/scala/io/dylemma/frp/EventPipe.scala#L43
Hmm.. I can't think of anything off the top of my head. I'll spend a bit of time and see if I can recreate the issue (I won't be on Android...).
Oh you already did fix it with the pull request didn't you.
I did :)
Thanks! Do you mind to publish it?
Working on that now. I have to go re-learn how to do it. Looks like it auto-closed when I did the merge. I'll re-open until I publish.
Great, thanks! Looking at Build.scala
, I think you just need to run sbt publish
and have your sonatype credentials somewhere.
That's the easy part. IIRC there's some extra voodoo I have to do through sonatype to get it into Maven Central.. that's the part I don't remember how to do, but no worries. The internet helps ;)
Oh, I see... I’m going the easy way with bintray and https://github.com/softprops/bintray-sbt :)
The release is up - I can see it at https://oss.sonatype.org/content/repositories/releases/io/dylemma/scala-frp_2.10/1.1/ and it should be sync'd to central within a few hours.
Thanks again! I’ll update my dependencies.
I’m on Android, but I don’t think it matters. What happens is that given a continuous stream of events
stream
,stream.foreach(_ ⇒ Log.d("S1", "working"))
gets printed all the time, even afterGC_EXPLICIT
, butstream.map(_ + 1).foreach(_ ⇒ Log.d("S2", "working"))
stops after firstGC_FOR_ALLOC
(see here for the meaning).Strange thing is that
Observer
still keeps all four references (twoFunction1
s, anEventSource
and aMappedEventStream
): I made a custom observer to debug this.I am not sure what else could be garbage collected there. Any thoughts?