对于函数参数,我是否要使用代码文档中的选项列表.对于<summary>标记,这没有问题(MSDN摘要列表).但是如何制作<param>标签的牛list列表?编程时,下面的示例不会在快速视图窗口中创建列表:
<param name="Type list">
<list type= "bullet">
<item><description>Item description</description></item>
</list>
</param>
Run Code Online (Sandbox Code Playgroud) 在我做的项目中是内存泄漏.我重写了所有修复一些的功能,但还剩下一个:
该程序有一个面板对象数组,每当我放入一个新的面板时,它会增长.当它达到400个面板时,它会删除最旧的面板以释放一些内存.
我不明白的是以下内容:
tempPanels = new Panel[panels.Length];
Array.Copy(panels, 1, tempPanels, 0, panels.Length - 1);//delete the oldest history log (the first of the array)
panels = null; //empty object array
panels = new Panel[tempPanels.Length + 1]; //set new length
tempPanels.CopyTo(panels, 0);//restore panels
Run Code Online (Sandbox Code Playgroud)
当我使用上面的代码时,内存使用量仍在不断增加...有人可以解释为什么我必须首先处理面板才能将面板设置为null吗?
tempPanels = new Panel[panels.Length];
Array.Copy(panels, 1, tempPanels, 0, panels.Length - 1);//delete the oldest history log (the first of the array)
panels[0].Dispose();
panels = null; //empty object array
panels = new Panel[tempPanels.Length + 1]; //set new length
tempPanels.CopyTo(panels, 0);//restore …Run Code Online (Sandbox Code Playgroud)