Finish any active sth's in DESTROY
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Cursor.pm
index 52aa9e8..df8aea5 100644 (file)
@@ -96,4 +96,9 @@ sub delete_all {
   return 1;
 }
 
+sub DESTROY {
+  my ($self) = @_;
+  $self->{sth}->finish if $self->{sth}->{Active};
+}
+
 1;