Skip to content

RemoveWatch()函数map循环删除好像有点问题 #40

Open
@GoogleCodeExporter

Description

@GoogleCodeExporter
这两天在看这个项目的源码,因为最近的开发要用到inotify的�
��性。Inotify 
class里的RemoveWatch()里,PathMap删除的处理有点问题,循环里eras
e后,iterator会失效。正确做法好像是for(;itr != map.end();){ if 
(need_delete) { map.erase(itr++) } else { ++itr};}

Original issue reported on code.google.com by [email protected] on 26 Aug 2010 at 10:58

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions