Example #1
0
 //--------
 FileWatcherWin32::~FileWatcherWin32()
 {
     WatchMap::iterator iter = mWatches.begin();
     WatchMap::iterator end = mWatches.end();
     for(; iter != end; ++iter)
     {
         DestroyWatch(iter->second);
     }
     mWatches.clear();
 }
Example #2
0
void FileWatcherWin32::removeWatch(WatchID watchid)
{
	WatchStruct* watch = mWatches.FindRef(watchid);
	if(PtrToBool(watch))
	{
		mWatches.Remove(watchid);

		DestroyWatch(watch);

	}
}
Example #3
0
    //--------
    void FileWatcherWin32::removeWatch(WatchID watchid)
    {
        WatchMap::iterator iter = mWatches.find(watchid);

        if(iter == mWatches.end())
            return;

        WatchStruct* watch = iter->second;
        mWatches.erase(iter);

        DestroyWatch(watch);
    }
Example #4
0
FileWatcherWin32::~FileWatcherWin32()
{
	WatchMap::Iterator iter( mWatches );

	while( iter )
	{
		DestroyWatch( iter.Value() );

		++iter;
	}

	mWatches.Clear();
}
Example #5
0
FileWatcherWin32::~FileWatcherWin32()
{
	WatchVector::iterator iter = mWatches.begin();

	mWatchesLock.lock();

	for(; iter != mWatches.end(); ++iter)
	{
		DestroyWatch((*iter));
	}

	mHandles.clear();
	mWatches.clear();

	mInitOK = false;

	mWatchesLock.unlock();

	efSAFE_DELETE( mThread );
}
Example #6
0
void FileWatcherWin32::removeWatch(WatchID watchid)
{
	mWatchesLock.lock();

	WatchVector::iterator iter = mWatches.begin();

	WatcherStructWin32* watch = NULL;

	for(; iter != mWatches.end(); ++iter)
	{
		// Find the watch ID
		if ( (*iter)->Watch->ID == watchid )
		{
			watch	= (*iter);

			mWatches.erase( iter );

			// Remove handle from the handle vector
			HandleVector::iterator it = mHandles.begin();

			for ( ; it != mHandles.end(); it++ )
			{
				if ( watch->Watch->DirHandle == (*it) )
				{
					mHandles.erase( it );
					break;
				}
			}

			DestroyWatch(watch);

			break;
		}
	}

	mWatchesLock.unlock();
}