Skip to content
Permalink
Browse files

Fixed memory leak. Closes #4.

  • Loading branch information...
dwmkerr committed Feb 27, 2015
1 parent 73a28ab commit 79998ca98101798608bdb914aecbd44f3ccbaa7a
@@ -1,3 +1,7 @@
## v0.6.3

* Fixed memory leak.

## v0.6.2

* Tidied up logic for cleanup.
@@ -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)"
@@ -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);
}
};

Some generated files are not rendered by default. Learn more.

0 comments on commit 79998ca

Please sign in to comment.
You can’t perform that action at this time.