I\'m working on an angularjs application using angularjs-nvd3-directives to render charts.
After a check with Chrome Developer Tools, I detected some memory leaks linked
I recommend that you move your graph to your own directives that will hold the nvd3 directives on their templates and listen on each directive for scope.
$destroy
also destroy the element on this event.
Controllers should retrieve the data and assign them to the directive.
You may be want to listen to the $routeChangeStart
on the directive, so the cleaning will be encapsulated on the part that use the data. This way you will avoid duplicate code.
I use this techniques to clean my directives that use modals so i don't have duplicate events listeners or ids.