Re: About free watcher in callback function

2012-07-16 Thread Marc Lehmann
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? On Mon, Jul 16, 2012 at 04:51:55AM +0200, Jo

Re: About free watcher in callback function

2012-07-15 Thread Jonathan Neuschäfer
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, s

About free watcher in callback function

2012-07-15 Thread 钱晓明
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? Thanks! ___ libev mailing list libev@lists.schmorp.de http:/