public int purgeAll(IntPtr connection)
        {
            int purgeCount = 0;

            lock (_locker){
                purgeCount = _pending.Count;
                for (int i = 0; i < _pending.Count; i++)
                {
                    LeapC.CancelImageFrameRequest(connection, _pending[i].Token);
                }
                _pending.Clear();
            }
            return(purgeCount);
        }
        public int purgeOld(IntPtr connection)
        {
            Int64 now        = LeapC.GetNow();
            int   purgeCount = 0;

            lock (_locker){
                for (int i = _pending.Count - 1; i >= 0; i--)
                {
                    ImageFuture ir = _pending[i];
                    if ((now - ir.Timestamp) > pendingTimeLimit)
                    {
                        _pending.RemoveAt(i);
                        LeapC.CancelImageFrameRequest(connection, ir.Token);
                        purgeCount++;
                    }
                }
            }
            return(purgeCount);
        }