On May 24, 2016 7:23 AM, "Heiko Jansen" <[email protected]> wrote:

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

That would explain it.  I may look at a similar approach for my code.

Thanks,

John

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

Reply via email to