Skip to content

Commit ef12c9e

Browse files
committed
Merge pull request #16 from admin-ch/master
Fix memory leak
2 parents ebd1cbe + 1afed78 commit ef12c9e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/angular-zeroclipboard.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ angular.module('zeroclipboard', [])
9696

9797
scope.$on('$destroy', function() {
9898
scope.client.off('complete', _completeHnd);
99+
scope.client = null;
100+
element.off();
101+
ZeroClipboard.destroy();
99102
});
100103
}
101104
};

0 commit comments

Comments
 (0)