sharpdx / SharpDX

SharpDX GitHub Repository
http://sharpdx.org
MIT License
1.68k stars 642 forks source link

Question about memory #1134

Open miguelgomezmunoz opened 5 years ago

miguelgomezmunoz commented 5 years ago

I have project that shows the world map but I was having issues with the memory so I have created a new empty project, currently I only have the following:

MainWindow.xaml

<Window x:Class="WorldMap.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"   
        xmlns:dxc="clr-namespace:SharpDX.WPF;assembly=SharpDX.WPF"
        xmlns:local="clr-namespace:WorldMap.Scenario"
        Title="World Map"        
        Height="1080" Width="1920"
        WindowStartupLocation="CenterScreen">
    <Grid Background="LightGray">
        <dxc:DXElement Grid.Column="0" x:Name="m_Dxelement">
            <dxc:DXElement.Renderer>
                <local:Scene_Map x:Name="m_Scene_Map"/>
            </dxc:DXElement.Renderer>
        </dxc:DXElement>
    </Grid>
</Window>

MainWindow.xaml.cs

using System.Windows;
namespace WorldMap
{
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
        }
    }
}

Scene_Map.cs

using SharpDX.WPF;
namespace WorldMap.Scenario
{
    public class Scene_Map : D3D11
    {
        public Scene_Map()
        {
        }
    }
}

When I execute it, the memory increases really fast (around 6MB each minute), what am I doing wrong? I am new into SharpDX so I really appreciate any help.

Thanks in advance.