⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 memleak.aspx

📁 This is a book about vb.you could learn this from this book
💻 ASPX
字号:
<%@ Import Namespace="System.Diagnostics" %>
<%@ Import Namespace="System.Text" %>

<script language="VB" runat=server>

   Sub Page_Load(Sender as Object, E as EventArgs) 

      if (Application("MemLeak") = Nothing) Then
        Application("MemLeak") = New StringBuilder
      End If

      Dim i as Integer
      Dim buffer as StringBuilder = Application("MemLeak")

      For i=1 to 100000
         buffer.Append("Adding more and more and more...")
      Next i

      Dim ProcessInfo as Process = Process.GetCurrentProcess()
      
      ProcessId.Text = ProcessInfo.Id.ToString()
      VirtualMemSize.Text = ProcessInfo.VirtualMemorySize.ToString()
   
   End Sub

</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 + -