Do I need to destroy local controller variables when directive is destroyed?
<p>I've been writing lots of Angular directives recently and have been reading about having to manually remove things you create in a directive when it is destroyed. It's still a little unclear though.</p>

<p>I know that anything palced on $scope is destroyed, but what about local variables, arrays, functions etc created in a directive's controller?</p>

<p>Here is some example code from my app</p>

<pre><code>angular.module('myModule').controller('s4pFileUploadCtrl', function($scope, $element, $attrs, FileUploader){

    var self = this;

    self.uploader = new FileUploader({
        settings: {}
    });

    // Elsewhere in the controller
    var reader = new FileReader();      
    reader.onload = onLoadFile;

    function onLoadFile(event) {
        var img = new Image();
        img.onload = onLoadImage;
    }

});
</code></pre>

<p>This is a contrived and very much cut down function, but do I need to remove the uploader on $scope destroy event? DO i need to do anything about the FileReader and it's associated onLoadFile event?</p>

<p>Any help would be appreciated. I've read loads of articles about cleaning up directives but none of them mention things like this.</p>