dylemma / scala.frp

Functional Reactive Programming for Scala
http://javadoc.io/doc/io.dylemma/scala-frp_2.11/1.3
MIT License
24 stars 6 forks source link

Handlers added to MappedEventStream get GCed #2

Closed stanch closed 10 years ago

stanch commented 10 years ago

I’m on Android, but I don’t think it matters. What happens is that given a continuous stream of events stream,

Strange thing is that Observer still keeps all four references (two Function1s, an EventSource and a MappedEventStream): I made a custom observer to debug this.

I am not sure what else could be garbage collected there. Any thoughts?

stanch commented 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

dylemma commented 10 years ago

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...).

dylemma commented 10 years ago

Oh you already did fix it with the pull request didn't you.

stanch commented 10 years ago

I did :)

stanch commented 10 years ago

Thanks! Do you mind to publish it?

dylemma commented 10 years ago

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.

stanch commented 10 years ago

Great, thanks! Looking at Build.scala, I think you just need to run sbt publish and have your sonatype credentials somewhere.

dylemma commented 10 years ago

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 ;)

stanch commented 10 years ago

Oh, I see... I’m going the easy way with bintray and https://github.com/softprops/bintray-sbt :)

dylemma commented 10 years ago

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.

stanch commented 10 years ago

Thanks again! I’ll update my dependencies.