When a directive is instantiated, a watch is configured.
scope.$watch('propertyName', function(value) {});
Do I have do do anything to prevent a memory leak when the directive is destroyed?
When a directive is instantiated, a watch is configured.
scope.$watch('propertyName', function(value) {});
Do I have do do anything to prevent a memory leak when the directive is destroyed?
No -- angular will take care of cleaning up watches when the associated scope
gets destroyed.
If you want to clear a watch however; the $watch function returns a function, which will de-register the watch when called.
var unregister = $scope.$watch('myVar', function() { /* ... */ });
unregister();