About free watcher in callback function

Jonathan Neuschäfer j.neuschaefer at gmx.net
Mon Jul 16 04:51:55 CEST 2012

On Mon, Jul 16, 2012 at 09:57:55AM +0800, 钱晓明 wrote:
> Hi, if my ev_io watcher is allocated by malloc(), can I stop it and free() it in its read/write callback function? After returned from callback function, dose libev still access this watcher?

AFAIK libev won't access a stopped watcher, so you can do that.
(Please correct me if I'm wrong)

Jonathan Neuschäfer

> Thanks!

More information about the libev mailing list