📄 memleak.aspx
字号:
<%@ Import Namespace="System.Diagnostics" %>
<%@ Import Namespace="System.Text" %>
<script language="C#" runat=server>
void Page_Load(Object Sender, EventArgs E)
{
if (Application["MemLeak"] == null)
Application["MemLeak"] = new StringBuilder();
int i;
StringBuilder buffer = (StringBuilder)Application["MemLeak"];
for (i=1; i<=100000; i++)
buffer.Append("Adding more and more and more...");
Process ProcessInfo = Process.GetCurrentProcess();
ProcessId.Text = ProcessInfo.Id.ToString();
VirtualMemSize.Text = ProcessInfo.VirtualMemorySize.ToString();
}
</script>
<html>
<body>
<h1> Memory Leak Example.... </h1>
<hr>
<h2>Process ID of ASP+: <asp:label id="ProcessId" forecolor=red runat=server/> </h2>
<h2>Virtual Memory Size of ASP+: <asp:label id="VirtualMemSize" forecolor=red runat=server/> </h2>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -