Skip to content

Commit

Permalink
Fixed memory leak. Closes #4.
Browse files Browse the repository at this point in the history
  • Loading branch information
dwmkerr committed Feb 27, 2015
1 parent 73a28ab commit 79998ca
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 5 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## v0.6.3

* Fixed memory leak.

## v0.6.2

* Tidied up logic for cleanup.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-modal-service",
"version": "0.6.2",
"version": "0.6.3",
"homepage": "https://github.com/dwmkerr/angular-modal-service",
"authors": [
"Dave Kerr (github.com/dwmkerr)"
Expand Down
11 changes: 11 additions & 0 deletions dst/angular-modal-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,17 @@
// We can now clean up the scope and remove the element from the DOM.
modalScope.$destroy();
modalElement.remove();

// Unless we null out all of these objects we seem to suffer
// from memory leaks, if anyone can explain why then I'd
// be very interested to know.
inputs.close = null;
deferred = null;
closeDeferred = null;
modal = null;
inputs = null;
modalElement = null;
modalScope = null;
}, delay);
}
};
Expand Down
4 changes: 2 additions & 2 deletions dst/angular-modal-service.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 79998ca

Please sign in to comment.