@@ -538,6 +538,7 @@ slidingWindow n (Fold step1 initial1 extract1)= Fold step initial extract
538538 step (Tuple4' rb rh i st) a
539539 | i < n = do
540540 rh1 <- liftIO $ unsafeInsert rb rh a
541+ liftIO $ touchForeignPtr (ringStart rb)
541542 r <- step1 st (a, Nothing)
542543 return $
543544 case r of
@@ -546,6 +547,7 @@ slidingWindow n (Fold step1 initial1 extract1)= Fold step initial extract
546547 | otherwise = do
547548 old <- liftIO $ peek rh
548549 rh1 <- liftIO $ unsafeInsert rb rh a
550+ liftIO $ touchForeignPtr (ringStart rb)
549551 r <- step1 st (a, Just old)
550552 return $
551553 case r of