Skip to content

Conversation

@ciaran-phillips
Copy link

If the directive is added to something other than a file input, it adds
file input elements to the document body. Since these are outside of the
element the directive is applied to, they aren't automatically removed at
the end of its life.

The cleanup code for these elements already existed, but it was only being called
once when the directive was first applied, and wasn't actually removing anything. Now it
will be called on $destroy, and the file elements are correctly removed

If the directive is added to something other than a file input, it adds
file input elements to the document body. Since these are outside of the
element the directive is applied to, they aren't automatically removed at
the end of its life.

The cleanup code for these elements already existed, but it was only being called
once when the directive was first applied, and wasn't doing anything. Now it
will be called on $destroy, and the file elements are correctly removed
@ciaran-phillips
Copy link
Author

This fixes the memory leak previously described by @dani3l in #1222

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant