Fixed massive memory leak caused by recreating data buffers.

Code cleanup.
This commit is contained in:
Kjell Kernen
2014-03-21 11:32:52 +01:00
parent ababec79f9
commit 054ff2dccf
3 changed files with 55 additions and 67 deletions
+9 -10
View File
@@ -1,13 +1,15 @@
<Window x:Class="OpenTXrecorder.MainWindow"
<Window x:Class="OpenTXrecorder.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="OpenTX Recorder"
Height="340"
Height="440"
MinWidth="840"
MaxWidth="840"
ResizeMode="CanResizeWithGrip" SizeToContent="Width" Icon="/OpenTXrecorder;component/icon.ico" MinHeight="340">
ResizeMode="CanResizeWithGrip" SizeToContent="Width" Icon="/OpenTXrecorder;component/icon.ico" MinHeight="450">
<Window.Resources>
<Window.Resources>
<DataTemplate x:Key="image">
<Image x:Name="TheImage" />
<DataTemplate.Triggers>
@@ -23,16 +25,13 @@
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid Grid.Row="0" Grid.Column="0" VerticalAlignment="Stretch">
<ListView Name="lvSentences"
SelectionMode="Single"
MouseDoubleClick="sentenceRowDblClk"
MouseDoubleClick="play"
VerticalAlignment="Stretch" >
<ListView.View>
<GridView>
<GridView.Columns>
@@ -98,9 +97,9 @@
</Button>
</StackPanel>
<Separator Height="5" />
<Label Content="RECORDING" Name="lblRecording" HorizontalAlignment="Center" Foreground="Red" FontSize="24" FontWeight="Black" Visibility="Hidden" />
<Label Content="RECORDING" Name="lblRecording" HorizontalAlignment="Center" Foreground="Red" FontSize="24" FontWeight="Black" Visibility="Hidden" />
</StackPanel>
<Image Grid.Row="0" Grid.Column="1" Name="openTXLogo" Height="48" MouseLeftButtonDown="about" HorizontalAlignment="Right" Cursor="Hand" Margin="0,0,0,0" Source="/OpenTXrecorder;component/recorder_logo.png" Stretch="Uniform" VerticalAlignment="Bottom" />
<Image Grid.Row="0" Grid.Column="1" Name="openTXLogo" Height="48" MouseLeftButtonDown="about" HorizontalAlignment="Right" Cursor="Hand" Margin="0,0,0,0" Source="/OpenTXrecorder;component/recorder_logo.png" Stretch="Uniform" VerticalAlignment="Bottom" />
</Grid>