内存被分配(Memory being allocated)
通过使用Chrome开发工具,我发现正在分配数组和对象。 我浏览了我的代码,寻找明显的
[]
,{}
和new
。 但没有。 我检查了创建新[]
,{}
,new
函数,并查看了这些函数的使用位置,并且我已经学会了不使用它们。 那么,如何分配内存呢?这对我来说是一个问题,因为每次GC启动时,它都会阻止主循环并且动画变得不一致。
By using the Chrome Development Tools, I found out arrays and objects were being allocated. I gone through my code looking for the obvious
[]
,{}
andnew
. But there isn't any. I have checked functions that create a new[]
,{}
,new
and looked to see where those functions are used, and I've learnt not to use them. So, how else can memory be allocated?This is a problem for me, because every time GC kicks in, it blocks the main loop and the animation becomes inconsistent.
原文:https://stackoverflow.com/questions/7349344
最满意答案
如果要以.Net 4.6.2为目标,则需要安装.NET Framework 4.6.2 Developer Pack 。
If you want to target .Net 4.6.2, you need to install the .NET Framework 4.6.2 Developer Pack.
相关问答
更多-
所有Microsoft.Extensions。*包都以.NET Standard 2.0为目标。 这意味着如果向应用程序添加适当的包,则可以使用依赖注入,配置,日志记录和 HttpClientFactory。 如果要将它与Polly一起使用,则需要添加Microsoft.Extensions.Http以使用HttpClientFactory和Microsoft.Extensions.Http.Polly 要配置HttpClientFactory,您必须将Microsoft.Extensions.Depend ...
-
任何人都可以请建议我怎样才能使两个分支(目标为4.5和4.6.2)成功地在具有正确的Nuget依赖关系的同一台机器上构建? 同意Hans的评论“ net45子目录为什么是空的,而不是标准的行为,这不是显而易见的事情,他们是否被手工剥离并检查到源代码控制? ”。 Nuget不会删除.NET 4.5文件夹中的.dll文件。 当您切换到指向.NET Framework 4.5的旧分支时,属性winodw中的程序集路径应该指向...\lib\net45\..文件夹。 而Git的默认行为并不是将packages文件夹 ...
-
如果要以.Net 4.6.2为目标,则需要安装.NET Framework 4.6.2 Developer Pack 。 If you want to target .Net 4.6.2, you need to install the .NET Framework 4.6.2 Developer Pack.
-
.NET Framework 4.6.2和.NET Standard 2.0不兼容(.NET Framework 4.6.2 and .NET Standard 2.0 incompatibility)[2024-04-13]
在VS 2017 15.3和.NET Core 2.0.0 SDK(2017年8月发布)中的最新工具更新中,支持.NET Standard 2.0的.NET Framework的最低版本为4.6.1。 这是通过添加兼容性DLL来确保库加载和工作的工具来实现的。 在4.6.1-4.7中只有少数API不支持,但Entity Framework Core应该可以在4.6.1+上运行。 对于.NET Framework 4.7.1+,工具不再需要注入这些库。 As of the latest tooling upd ... -
现在,只能通过Nuget将依赖项添加到.Net Core Class Library。 这是因为新项目模板/ .xproj的工作原理有所不同。 应该再次支持程序集引用,以便使用.NET Core的csproj项目( 引用第三方dll的问题) Right now it is possible to add dependency to .Net Core Class Library only via Nuget. This is cause the new project templates/.xproj wo ...
-
Runtime版本和Target版本是不同的东西。 您需要运行Visual Studio 2017 setup并选择Individual Components下的.net 4.6.2 SDK/Targeting pack : 在VS2017中默认不选择它们。 您还必须为.net 4.7执行此操作,默认情况下也不会安装它。 The Runtime version and Target versions are different things. You need to run Visual Studio 20 ...
-
我想这是出于兼容性的原因。 x86可能会引用
中的 。 win7-x86 -
在当前的1.0工具中,.NET 4.6.2可以引用.NET Standard 1.5项目,但.NET Standard 1.5项目不能引用.NET 4.6.2项目。 一旦“Tooling 2.0”出现netstandard 2.0,你就可以使用新的垫片功能完成两个方向,但在此之前,你需要让你的类库单元测试项目也是一个.NET 4.6.2项目。 In the current 1.0 tooling .NET 4.6.2 can reference a .NET Standard 1.5 project, bu ...
-
可能你需要取消注释loggerFactory.AddNLog(); 在app.AddNLogWeb();之前app.AddNLogWeb(); 在您的Configure方法中。 env.ConfigureNLog("nlog.config"); 应根据文档中的示例在构造函数中。 另请参阅https://github.com/NLog/NLog.Extensions.Logging中的“ How to use部分 我还想建议使用与示例中相同的代码行。 如果这样可以根据您的需要改变它们。 希望这可以帮助。 Pr ...
-
构建针对完整.net框架的VS2017 .net核心应用程序(Building VS2017 .net core apps that target the full .net framework)[2022-03-30]
您的项目正在使用最新的基于MSBuild的.NET Core项目文件。 扩展名仍然是.csproj,但XML模式与.NET46(和以前的版本)中使用的普通.csproj不同。 您需要适当的工具来构建此类.csproj文件,例如: Visual Studio 2017:将其安装在您的私有构建代理上; VSTS托管构建代理尚未安装VS2017; .NET Core SDK 1.0.0-preview4-004233(或更新版本):此SDK包含用于基于MSBuild .NET Core的项目的命令行工具“dotn ...