diff --git a/sourmash/_minhash.pyx b/sourmash/_minhash.pyx index 5652218667..af9471c305 100644 --- a/sourmash/_minhash.pyx +++ b/sourmash/_minhash.pyx @@ -324,7 +324,10 @@ cdef class MinHash(object): common.intersection_update(other.get_mins()) common.intersection_update(combined_mh.mins) - return common, max(combined_mh.size(), 1) + size = max(combined_mh.size(), 1) + del combined_mh + + return common, size def compare(self, MinHash other): common, size = self.intersection(other)