We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
For reference, found when working with SukiUI library : kikipoulet/SukiUI#245
Basically, it seems that memory from infinite animation aren't correctly cleaned.
Generating 100 "animated" buttons every second :
Generating the same buttons, without the infinite animation :
axaml
<Window xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" x:Class="AvaloniaApplication5.MainWindow" Title="AvaloniaApplication5"> <Window.Styles> <Style Selector="Button"> <Style.Animations> <Animation FillMode="None" IterationCount="Infinite" PlaybackDirection="Normal" Duration="0:0:1.5"> <Animation.Easing> <QuadraticEaseInOut /> </Animation.Easing> <KeyFrame Cue="0%"> <Setter Property="RotateTransform.Angle" Value="0" /> </KeyFrame> <KeyFrame Cue="30%"> <Setter Property="RotateTransform.Angle" Value="0" /> </KeyFrame> <KeyFrame Cue="100%"> <Setter Property="RotateTransform.Angle" Value="360" /> </KeyFrame> </Animation> </Style.Animations> </Style> </Window.Styles> <StackPanel> <Button Content="test" Click="Button_OnClick"></Button> <StackPanel Name="SP"></StackPanel> </StackPanel> </Window>
C#
using System.Threading; using System.Threading.Tasks; using Avalonia.Controls; using Avalonia.Interactivity; using Avalonia.Threading; namespace AvaloniaApplication5; public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_OnClick(object? sender, RoutedEventArgs e) { var stackpanel = this.Get<StackPanel>("SP"); Task.Run(() => { while (true) { Dispatcher.UIThread.Invoke(() => { stackpanel.Children.Clear(); for (int i = 0; i < 100; i++) { stackpanel.Children.Add(new Button() { Content = "test" }); } }); Thread.Sleep(1000); } }); } }
No response
11.2.0-rc1
Windows
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Describe the bug
For reference, found when working with SukiUI library : kikipoulet/SukiUI#245
Basically, it seems that memory from infinite animation aren't correctly cleaned.
Generating 100 "animated" buttons every second :
Generating the same buttons, without the infinite animation :
To Reproduce
axaml
C#
Expected behavior
No response
Avalonia version
11.2.0-rc1
OS
Windows
Additional context
No response
The text was updated successfully, but these errors were encountered: