Skip to content

memory overflow #37

Description

@LazyCuteLion

when switch source,seems the old value does not dispose:the memory has not decreased. (wait some minutes also not)
the code is very simple and nothing special:

private void Button_Click(object sender, RoutedEventArgs e)
{
    var dialog = new OpenFileDialog();
    if (dialog.ShowDialog() == true)
    {
        var source = new BitmapImage(new Uri(dialog.FileName));
        ImageBehavior.SetRepeatBehavior(img, System.Windows.Media.Animation.RepeatBehavior.Forever);
        ImageBehavior.SetAutoStart(img, true);
        ImageBehavior.SetAnimatedSource(img, source);
    }
}

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