diff --git a/dedupe/api.py b/dedupe/api.py
index <HASH>..<HASH> 100644
--- a/dedupe/api.py
+++ b/dedupe/api.py
@@ -125,6 +125,7 @@ class Matching(object):
 
         try :
             match_file = matches.filename
+            del matches
             os.remove(match_file)
         except AttributeError :
             pass
delete matches so we can delete matches file