Skip to content

Memory leaking #18

Description

@lpfeup

I noticed that memory was leaking while switching back and forth between pages that included the datepicker. The DOM Node Count in Google Chrome kept going up.

I solved it by including the following snippet before returning from the link function:


    $scope.$on('$destroy', function() {
        if(input.data("DateTimePicker")) {
            input.data("DateTimePicker").destroy();
        }
        element.off("change.dp");
    });

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions