Am Dienstag, 24. Mai 2016 13:51:42 UTC+2 schrieb john: > > What confuses me is that I was previously using Mojo::Pg::PubSub and > this works: >
I think it works like this: https://metacpan.org/source/SRI/Mojo-Pg-2.27/lib/Mojo/Pg/PubSub.pm#L14 keeps a reference to the callback inside the Mojo::Pg::PubSub object. And the Mojo::Pg::PubSub object is referenced from Mojolicious. So the reference counter of the callback does not reach 0. In your Inotifier code nothing outside wsinit() retains a reference to the callback once wsinit() is left (the Inotifier::Model::FileWatch theoretically might, but that object also gets destroyed when leaving wsinit()). -- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/d/optout.
