Animation memory leak
Last post 05-19-2008 1:09 AM by Yi-Lun Luo - MSFT. 1 replies.
Sort Posts:
05-16-2008 4:23 PM
Animation memory leak

Suppose I have a Ellipse UIElement which includes an animation object, and it be added and removed every 15 seconds at runtime, the problem is that I can’t clear the animation’s memory when the Ellipse UIElement be removed, Do you have any idea?

 The below is the xaml code:  <Ellipse x:Name="ellipse387_229_13_13_1015" Canvas.Left="387" Canvas.Top="229" Width="13" Height="13" Stroke="#ff6e05"  StrokeThickness="1" Fill="#ff6e05" >      <Ellipse.Triggers>            <EventTrigger RoutedEvent="Ellipse.Loaded">                  <BeginStoryboard>                        <Storyboard x:Name="storyboard_ellipse387_229_13_13_1015" >                              <ColorAnimationUsingKeyFrames                               Storyboard.TargetName="ellipse387_229_13_13_1015"                               Storyboard.TargetProperty="(Fill).(Color)"                                BeginTime="0:0:0" RepeatBehavior="30x" >                               <DiscreteColorKeyFrame KeyTime="0:0:1" Value="#000000" />                               <DiscreteColorKeyFrame KeyTime="0:0:2" Value="#ff6e05" />                              </ColorAnimationUsingKeyFrames>                        </Storyboard>                  </BeginStoryboard>            </EventTrigger>      </Ellipse.Triggers>

</Ellipse>

 

Regards,

Frank

Frank Wu

Loading...
Joined on 02-25-2008
Toronto, ON, Canada
Posts 56
05-19-2008 1:09 AM
Re: Animation memory leak

Hello, can you post some code on how you remove the Ellipse? The memory will be collected by GC at a proper time if the Ellipse is no longer referenced by anything. But without seeing your code, it's very hard to say nothing still references the Ellipse...

shanaolanxing - This posting is provided "AS IS" with no warranties, and confers no rights.

Yi-Lun Luo - MSFT

Loading...
Joined on 10-29-2007
Posts 2,406
Page view counter