我正在使用visual studio 2010,每次打开它时,都会禁用"工具 - >选项 - >调试下的"我的代码".有谁知道如何永久启用此功能?
如果这有任何不同,我启用了以下扩展:
.NET反射器视觉工作室扩展; NuGet包管理器; 流程模板编辑器; 生产力电动工具; specflow; WITDesigner
请考虑以下代码:
using System;
namespace memoryEater
{
internal class Program
{
private static void Main(string[] args)
{
Console.WriteLine("alloc 1");
var big1 = new BigObject();
Console.WriteLine("alloc 2");
var big2 = new BigObject();
Console.WriteLine("null 1");
big1 = null;
//GC.Collect();
Console.WriteLine("alloc3");
big1 = new BigObject();
Console.WriteLine("done");
Console.Read();
}
}
public class BigObject
{
private const uint OneMeg = 1024 * 1024;
private static int _idCnt;
private readonly int _myId;
private byte[][] _bigArray;
public BigObject()
{
_myId = _idCnt++;
Console.WriteLine("BigObject {0} creating... ", _myId);
_bigArray …Run Code Online (Sandbox Code Playgroud)